fml.define("app/at", ["jquery", "app/insertAtCaret", "component/cursorPostion", "component/shareTmp"], function (a, b) {
    var c = a("jquery"), d = a("component/cursorPostion"), e = a("component/shareTmp"), f = a("app/insertAtCaret"), g = 0, h = {}, i = null, j = "", k = "", l = "", m = !0, n = !0;
    return function (a, b) {
        function n(a) {
            var b = a.keyCode, e = c(".atNameItem"), h = e.size() - 1;
            if (b == 38 || b == 40)g += b - 39, g < 0 ? g = h : g > h ? g = 0 : g, e.removeClass("search_bg").eq(g).addClass("search_bg");
            b == 13 && e.eq(g).text() != "" && (k == "" && l == "" ? f(c(i), e.eq(g).text() + " ") : (c(i).val(k + e.eq(g).text() + " " + l), d.setCaretPosition(i, sectionPos + e.eq(g).text().length)), c(".atSearch").remove())
        }

        function o(a, b, d) {
            var f = "/aj/getNick/", g = {word: a}, i = function (f) {
                h[a] = f, m = !0;
                var g = e("atSearchKey");
                c("body").append(g), c(".atSearch").css({top: b, left: d}), f.length == 0 ? c(".atTitle").html("轻敲空格完成输入") : c(".atTitle").html("选择昵称或轻敲空格完成输入");
                var i = "";
                c.each(f, function (a, b) {
                    i += '<li class="atNameItem" style="padding:5px 10px;white-space:nowrap;">' + b + "</li>"
                }), c(".atNameItem").remove(), c(".atSearch").append(i), c(".atNameItem").eq(0).addClass("search_bg")
            };
            h[a] ? i(h[a]) : m && (c.get(f, g, i, "json"), m = !1)
        }

        a = a || "#forwardContent", b = b || ".atDiv", c("body").on("keydown", a, function (a) {
            if (a.keyCode == 38 || a.keyCode == 40)return!1;
            if (a.keyCode == 13 && c(".atSearch").length > 0)return!1
        }), c(document).on("keyup click", a, function (a) {
            var e = a.keyCode;
            if (e == 224)return!1;
            var f = c(this), h = f.val(), m = d.getSelection(this), p = +f.css("font-size").replace("px", "") + 5, q = h.substring(0, m.end - 1), r = h.substring(m.start, m.end - 1), s = h.substring(q.length + 1, h.length), t = c.browser.msie || c.browser.chrome ? 0 : 5;
            c(b).css({height: f.height(), width: f.width() - t, top: f.offset().top, left: f.offset().left, lineHeight: f.css("line-height"), fontSize: f.css("font-size"), fontWeight: f.css("font-weight"), fontFamily: f.css("font-family"), zIndex: -1e3, padding: f.css("paddingLeft"), border: "solid 1px"});
            var u = c(b).find(".flag");
            c(b).find(".before").html(q.replace(/ /g, '<span style="white-space:pre-wrap;"> </span>').replace(/\r\n/g, "<br />").replace(/\n/g, "<br />")), u.html(r), c(b).find(".after").html(s.replace(/ /g, '<span style="white-space:pre-wrap;"> </span>').replace(/\r\n/g, "<br />").replace(/\n/g, "<br />"));
            var v = u.offset().top, w = u.offset().left;
            c(".atSearch").remove(), i = this, c(b).scrollTop(f.scrollTop());
            if (r == "@")o("", v + p, w), k = "", l = ""; else {
                var x = h.substring(0, m.end).length, y = "";
                if (h.indexOf("@") != -1) {
                    var z = h.substring(0, m.end).split("");
                    for (var A = x - 1; A >= 0; A--) {
                        if (z[A] == "\n" || z[A] == "\r\n" || z[A] == " " || y.length >= 20)break;
                        if (z[A] == "@") {
                            j = y.split("").reverse().join(""), o(j, v + p, w), sectionPos = m.end, k = h.substring(0, m.end - (m.end - A - 1)), l = h.substring(m.end, h.length);
                            break
                        }
                        y += z[A]
                    }
                }
            }
            e == 38 || e == 40 || e == 13 ? g = g : g = 0, n.call(this, a)
        }), c(document).on("blur", a, function (a) {
            window.setTimeout(function () {
                c(".atSearch").remove()
            }, 200)
        }), c(document).on("click", ".atNameItem", function () {
            k == "" && l == "" ? f(c(i), c(this).text() + " ") : (c(i).val(k + c(this).text() + " " + l), d.setCaretPosition(i, sectionPos + c(this).text().length)), window.setTimeout(function () {
                c(".atSearch").remove()
            }, 100)
        }), c(document).on("mouseover", ".atNameItem", function () {
            var a = c(".atNameItem");
            return a.removeClass("search_bg"), c(this).addClass("search_bg"), g = c(this).index() - 1, !1
        })
    }
});
fml.define("component/callApi", [], function (a, b) {
    function i() {
        return(+(new Date)).toString(36) + "_" + ++e
    }

    function j(a, b) {
        var d = document.createElement("script");
        d.type = "text/javascript", d.src = a, d.async = !0, d.onerror = d.onload = d.onreadystatechange = function () {
            if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")b && b(), d.onerror = d.onload = d.onreadystatechange = null, c.removeChild(d)
        }, c.insertBefore(d, c.firstChild)
    }

    function k(a, b, c) {
        var e = a.host || Meilishuo.config.apiHost[a.backend || "default"], f = a.url, g = i();
        f += f.indexOf("?") > -1 ? "&" : "?", f += "__callback=" + encodeURIComponent(g), c && (f += "&backname=data&backuri=" + encodeURIComponent(location.protocol + "//" + location.host + a.proxyPath)), f = e + f, window[g] = function (c, d) {
            d && d.reason == "timeout" ? console.log("timeout", {api: f}) : (clearTimeout(h), (!a.dataType || a.dataType == "json") && typeof c == "string" && (c = (new Function("return " + c))()), b(c), window[g] = null)
        };
        var h = setTimeout(function () {
            window[g](null, {status: "error", reason: "timeout"})
        }, a.timeout || d);
        return f
    }

    function l(a, b, c) {
        if (arguments.length > 1) {
            if (h(a))for (var d = 0, e = a.length; d < e; d++)l(a[d], b + "[" + d + "]", c); else if (g(a))for (var d in a)l(a[d], b + "[" + d + "]", c); else c.push(b + "=" + encodeURIComponent(a));
            return c
        }
        var f = [];
        if (a)for (var i in a)l(a[i], i, f);
        return f.join("&") || ""
    }

    var c = document.head || document.getElementsByTagName("head")[0] || document.documentElement, d = 3e4, e = 0, f = Object.prototype.toString, g = function (a) {
        return f.call(a) === "[object Object]"
    }, h = Array.isArray || function (a) {
        return f.call(a) === "[object Array]"
    };
    b.read = function (a, b, c) {
        typeof b == "function" && (c = b, b = null);
        var d = k(a, c);
        b = l(b), b && (b = "&" + b), j(d + b, a.oncomplete)
    }, b.write = function (a, c, d) {
        typeof c == "function" && (d = c, c = null), a.proxyPath = a.proxyPath || Meilishuo.config.proxyPath;
        if (!a.proxyPath)return b.read(a, c, d);
        var e = i(), f = document.createElement("form");
        f.style.display = "none", f.setAttribute("action", k(a, d, !0)), f.setAttribute("method", "post"), f.setAttribute("target", e);
        if (c)for (var g in c) {
            var h = document.createElement("input");
            h.name = g, h.value = c[g], f.appendChild(h)
        }
        var j;
        try {
            j = document.createElement('<iframe name="' + e + '">')
        } catch (l) {
            j = document.createElement("iframe")
        }
        j.style.display = "none", j.id = e, j.name = e, document.body.appendChild(f), document.body.appendChild(j), f.submit()
    }
});
fml.define("component/animate", ["jquery"], function (a, b) {
    var c = a("jquery");
    b.twinkle = function (a, b, d, e) {
        b || (b = 500), d || (d = 0), e || (e = !0), d = -d, a = c(a);
        if (!a.length)return;
        var f = a.get(0), g = 0, h = null, i = !1;
        clearTimeout(h), h = window.setTimeout(function () {
            i || (i = !0, a.show());
            var c = f.style.visibility;
            f.style.visibility = c == "hidden" ? "visible" : "hidden", g--;
            if (g <= d)return window.clearTimeout(h), e ? a.show() : (a.hide(), i = !1), g = 0, !1;
            h = window.setTimeout(arguments.callee, b)
        }, b)
    }
});
fml.define("core/animation", [], function (a, b) {
    (function () {
        var a = 0, b = ["webkit", "moz"];
        for (var c = 0; c < b.length && !window.requestAnimationFrame; ++c)window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"];
        window.requestAnimationFrame || (window.requestAnimationFrame = function (b, c) {
            var d = (new Date).getTime(), e = Math.max(0, 16.7 - (d - a)), f = window.setTimeout(function () {
                b(d + e)
            }, e);
            return a = d + e, f
        }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (a) {
            clearTimeout(a)
        })
    })(), b.requestFrame = window.requestAnimationFrame, b.cancelFrame = window.cancelAnimationFrame;
    var c = {Linear: function (a, b, c, d) {
        return c * a / d + b
    }, Quad: {easeIn: function (a, b, c, d) {
        return c * (a /= d) * a + b
    }, easeOut: function (a, b, c, d) {
        return-c * (a /= d) * (a - 2) + b
    }, easeInOut: function (a, b, c, d) {
        return(a /= d / 2) < 1 ? c / 2 * a * a + b : -c / 2 * (--a * (a - 2) - 1) + b
    }}, Cubic: {easeIn: function (a, b, c, d) {
        return c * (a /= d) * a * a + b
    }, easeOut: function (a, b, c, d) {
        return c * ((a = a / d - 1) * a * a + 1) + b
    }, easeInOut: function (a, b, c, d) {
        return(a /= d / 2) < 1 ? c / 2 * a * a * a + b : c / 2 * ((a -= 2) * a * a + 2) + b
    }}, Quart: {easeIn: function (a, b, c, d) {
        return c * (a /= d) * a * a * a + b
    }, easeOut: function (a, b, c, d) {
        return-c * ((a = a / d - 1) * a * a * a - 1) + b
    }, easeInOut: function (a, b, c, d) {
        return(a /= d / 2) < 1 ? c / 2 * a * a * a * a + b : -c / 2 * ((a -= 2) * a * a * a - 2) + b
    }}, Quint: {easeIn: function (a, b, c, d) {
        return c * (a /= d) * a * a * a * a + b
    }, easeOut: function (a, b, c, d) {
        return c * ((a = a / d - 1) * a * a * a * a + 1) + b
    }, easeInOut: function (a, b, c, d) {
        return(a /= d / 2) < 1 ? c / 2 * a * a * a * a * a + b : c / 2 * ((a -= 2) * a * a * a * a + 2) + b
    }}, Sine: {easeIn: function (a, b, c, d) {
        return-c * Math.cos(a / d * (Math.PI / 2)) + c + b
    }, easeOut: function (a, b, c, d) {
        return c * Math.sin(a / d * (Math.PI / 2)) + b
    }, easeInOut: function (a, b, c, d) {
        return-c / 2 * (Math.cos(Math.PI * a / d) - 1) + b
    }}, Expo: {easeIn: function (a, b, c, d) {
        return a == 0 ? b : c * Math.pow(2, 10 * (a / d - 1)) + b
    }, easeOut: function (a, b, c, d) {
        return a == d ? b + c : c * (-Math.pow(2, -10 * a / d) + 1) + b
    }, easeInOut: function (a, b, c, d) {
        return a == 0 ? b : a == d ? b + c : (a /= d / 2) < 1 ? c / 2 * Math.pow(2, 10 * (a - 1)) + b : c / 2 * (-Math.pow(2, -10 * --a) + 2) + b
    }}, Circ: {easeIn: function (a, b, c, d) {
        return-c * (Math.sqrt(1 - (a /= d) * a) - 1) + b
    }, easeOut: function (a, b, c, d) {
        return c * Math.sqrt(1 - (a = a / d - 1) * a) + b
    }, easeInOut: function (a, b, c, d) {
        return(a /= d / 2) < 1 ? -c / 2 * (Math.sqrt(1 - a * a) - 1) + b : c / 2 * (Math.sqrt(1 - (a -= 2) * a) + 1) + b
    }}, Elastic: {easeIn: function (a, b, c, d, e, f) {
        var g;
        return a == 0 ? b : (a /= d) == 1 ? b + c : (typeof f == "undefined" && (f = d * .3), !e || e < Math.abs(c) ? (g = f / 4, e = c) : g = f / (2 * Math.PI) * Math.asin(c / e), -(e * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * d - g) * 2 * Math.PI / f)) + b)
    }, easeOut: function (a, b, c, d, e, f) {
        var g;
        return a == 0 ? b : (a /= d) == 1 ? b + c : (typeof f == "undefined" && (f = d * .3), !e || e < Math.abs(c) ? (e = c, g = f / 4) : g = f / (2 * Math.PI) * Math.asin(c / e), e * Math.pow(2, -10 * a) * Math.sin((a * d - g) * 2 * Math.PI / f) + c + b)
    }, easeInOut: function (a, b, c, d, e, f) {
        var g;
        return a == 0 ? b : (a /= d / 2) == 2 ? b + c : (typeof f == "undefined" && (f = d * .3 * 1.5), !e || e < Math.abs(c) ? (e = c, g = f / 4) : g = f / (2 * Math.PI) * Math.asin(c / e), a < 1 ? -0.5 * e * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * d - g) * 2 * Math.PI / f) + b : e * Math.pow(2, -10 * (a -= 1)) * Math.sin((a * d - g) * 2 * Math.PI / f) * .5 + c + b)
    }}, Back: {easeIn: function (a, b, c, d, e) {
        return typeof e == "undefined" && (e = 1.70158), c * (a /= d) * a * ((e + 1) * a - e) + b
    }, easeOut: function (a, b, c, d, e) {
        return typeof e == "undefined" && (e = 1.70158), c * ((a = a / d - 1) * a * ((e + 1) * a + e) + 1) + b
    }, easeInOut: function (a, b, c, d, e) {
        return typeof e == "undefined" && (e = 1.70158), (a /= d / 2) < 1 ? c / 2 * a * a * (((e *= 1.525) + 1) * a - e) + b : c / 2 * ((a -= 2) * a * (((e *= 1.525) + 1) * a + e) + 2) + b
    }}, Bounce: {easeIn: function (a, b, d, e) {
        return d - c.Bounce.easeOut(e - a, 0, d, e) + b
    }, easeOut: function (a, b, c, d) {
        return(a /= d) < 1 / 2.75 ? c * 7.5625 * a * a + b : a < 2 / 2.75 ? c * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? c * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : c * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b
    }, easeInOut: function (a, b, d, e) {
        return a < e / 2 ? c.Bounce.easeIn(a * 2, 0, d, e) * .5 + b : c.Bounce.easeOut(a * 2 - e, 0, d, e) * .5 + d * .5 + b
    }}};
    b.Tween = c
});
fml.define("component/windowResize", ["jquery"], function (a, b) {
    function f() {
        e && clearTimeout(e), e = window.setTimeout(function () {
            var a = d.length;
            for (var b = 0; b < a; b++)d[b]()
        }, 240)
    }

    var c = a("jquery"), d = [], e;
    if (c.browser.msie) {
        var g = document.createElement("div");
        g.style.cssText = "width:100%;height:0px;position:absolute;bottom:0px;left:0px;overflow:hidden", document.body.appendChild(g), g.onresize = f
    } else window.onresize = f;
    b.bind = function (a) {
        d.push(a)
    }
});
fml.define("app/cleanMsg", ["jquery", "page/im/open", "core/animation", "component/iStorage", "component/animate"], function (a, b) {
    function q() {
        var b = a("component/iStorage");
        b.get(m, function (a) {
            a || h.show(), b.set(m, !0)
        })
    }

    function s(a) {
        return a > 99 ? "99+" : a
    }

    function t(a) {
        var b = Meilishuo.config.user_id, c = {customer_num: ["有%d个客服消息", "客服消息", "/im/"], fans_num: ["有%d个新关注", "关注", "/ur/fans/" + b], atme_num: ["有%d个新@我的", "@我的", "/atme/"], pmsg_num: ["有%d条新私信", "私信", "/msg/main/user"], sysmesg: ["有%d条新系统消息", "系统消息", "/msg/main/syser"], recommend_num: ["有%d个喜欢我的", "喜欢我的", "/ur/like/" + b], a_reply_num: ["有%d条新的回复", "回复我的", "/club/recommend/" + b]}, e = [], f = [], g = 0;
        for (var h in c) {
            var i = a === !0 ? 0 : k[h] | 0;
            i ? e.push([h, i]) : f.push(h), g += i
        }
        var j = e.length, l = "", m = "";
        if (j) {
            for (var n = 0; n < j; n++) {
                var o = e[n], h = o[0];
                l += '<li class="cleanOnce" dk="' + h + '" ><a  href="' + (c[h][2] || "###") + '" ', "customer_num" != h ? l += 'target="_BLANK" ' : l += 'class="openIM"', l += ">" + c[h][0].replace("%d", '<b class="msgCountNum red_f">' + s(o[1]) + "</b>") + "</a></li>"
            }
            l += '<li class="b_line cleanOnce" dk="all"><span class="mes_know cursor_f right_f">知道了</span></li>', m = l
        }
        j = f.length;
        for (var n = 0; n < j; n++) {
            var h = f[n];
            if (!c[h][2])continue;
            l += "<li ><a " + ("customer_num" == h ? 'class="openIM"' : "") + '  href="' + c[h][2] + '" target="_msg">查看' + c[h][1] + "</a></li>"
        }
        g ? d("#message .num_bgc").text(g).show() : d("#message .num_bgc").hide(), d("#moreMessageBox").html(l)
    }

    function u() {
        var a = d(this).attr("dk");
        "all" != a ? v(a) : (w(!0), t(!0))
    }

    function v(a) {
        k[a] = 0, t(), w(a)
    }

    function w(a) {
        var b = "/aj/msg/setzero", c = {param: a == 1 ? "all" : a};
        d.post(b, c)
    }

    function x(a, b) {
        a && (j *= 1.2), b && (j *= 1.2), !a && !b && (j = 1), j > 5 && (j = 5)
    }

    function z(a) {
        var b = d("#side-im span");
        b.length && (a > 0 ? (a > 99 ? (a = "99+", b.addClass("gt99")) : b.removeClass("gt99"), b.text(a).show()) : b.hide())
    }

    function A() {
        var a = Meilishuo.config.user_id, b = ["register_step3", "register_step4"];
        for (var c in b)if (Meilishuo.config.controller === b[c])return;
        if (!a)return;
        n && window.clearTimeout(n);
        var e = Meilishuo.config.controller === "home" ? "/aj/getMsg/msg" : "/aj/getMsg/";
        d.get(e, function (a) {
            k = a.msg || a;
            if (typeof k.user_id != "undefined" && k.user_id != Meilishuo.config.user_id)return;
            z(k.customer_num);
            var b = a.newshare ? a.newshare.num | 0 : 0;
            r(b), t(), x(b, k.total_num | 0)
        }, "json"), n = window.setTimeout(A, i * j)
    }

    var c = Meilishuo.config.user_id, d = a("jquery"), e = a("page/im/open"), f = a("component/animate"), g = d("#navbar .shining"), h = d("#navbar .h_ico"), i = 6e4, j = 1, k = {}, l = !1, m = "app/cleanMsg_icotip", n, o, p = 0;
    h.hover(function () {
        if (Meilishuo.config.controller == "home")return;
        o && window.clearTimeout(o)
    }, function () {
        h.hide()
    }), g.parent().hover(function () {
        if (Meilishuo.config.controller == "home")return;
        p && h.show()
    }, function () {
        p && (o = window.setTimeout(function () {
            h.hide()
        }, 200))
    });
    var r = function (a) {
        p = a;
        if (Meilishuo.config.controller == "home")return;
        a ? (g.html(s(a)), h.find("span.red_f").html(s(a)), d(".home").attr("href", "/?frm=on_yellow_show"), l || (l = !0, f.twinkle(g, 500, 6, !0), q())) : (g.hide(), h.hide(), d(".home").attr("href", "/"), l = !1)
    };
    d("#moreMessageBox").on("click", "li.cleanOnce", u), d("#global-sidebar").on("click", ".openIM", function () {
        return e.reCallImWin({is_simple: !0}), d(this).parent().trigger("click"), !1
    });
    var y = d(".openIM");
    y.click(function () {
        return e.reCallImWin({is_simple: !0}), z(0), !1
    }), b.msgFunc = function () {
        t(), n = window.setTimeout(A, i / 4)
    }, b.msgImmedialy = function () {
        A()
    }
});
fml.define("component/dragdrop", ["jquery"], function (a) {
    var b = a("jquery"), c = b(document);
    b.fn.draggable = function (a) {
        function k(k) {
            if (b(k.target).closest(a.except).length == 1)return;
            if (j)return;
            j = !0, c.on("mousemove", m), c.on("mouseup", l), e.data("dragging", 1), typeof a.start == "function" && a.start.call(e, k), f = e.parent(), h = e.offset(), i = {position: e.css("position"), top: e.css("top"), left: e.css("left")}, g = {x: k.clientX + b(document).scrollLeft(), y: k.clientY + b(document).scrollTop()};
            if (a.replace) {
                b(a.replace).insertBefore(e).show();
                for (var n = 0; n < a.replace_css.length; n++) {
                    var o = a.replace_css[n];
                    b(a.replace).css(o, e.css(o))
                }
            }
            e.appendTo(a.appendTo).css({position: "absolute", top: h.top + "px", left: h.left + "px"})
        }

        function l(f) {
            if (!e.data("dragging"))return;
            e.data("dragging", 0), c.unbind("mousemove", m), c.unbind("mouseup", l), typeof a.stop == "function" && a.stop.call(e, f), a.replace && b(a.replace).hide(), !a.do_not_restore && i && e.css(i), j = !1
        }

        function m(b) {
            typeof a.move == "function" && a.move.call(e, b), a.axis == "y" ? e.css({top: h.top + b.clientY + c.scrollTop() - g.y + "px"}) : a.axis == "x" ? e.css({left: h.left + b.clientX + c.scrollLeft() - g.x + "px"}) : e.css({left: h.left + b.clientX + c.scrollLeft() - g.x + "px", top: h.top + b.clientY + c.scrollTop() - g.y + "px"})
        }

        var e = b(this).data("draggable", "1"), f = null, g = null, h = null, i = null, j = !1;
        b(a.appendTo).length ? a.appendTo = b(a.appendTo) : a.appendTo = e.parent();
        var n = a.handle ? e.find(a.handle) : e;
        n.on("mousedown", b.proxy(k, e))
    }
});
fml.define("app/im/postMessage", [], function (a, b) {
    var c = {};
    b.on = function (a, b) {
        c[a] = b
    }, window.onmessage = function (a) {
        var b = a.data;
        if (!b || !c[b])return;
        c[b]()
    }, b.postMessage = function (a, b, c) {
        c = c || "*", a && a.postMessage && a.postMessage(b, c)
    }
});
fml.define("component/userstate", ["jquery", "component/iStorage"], function (a, b) {
    var c = a("jquery"), d = a("component/iStorage"), e = new Date, f = c.browser, g = {};
    c(document).bind("mousemove", function () {
        e = new Date
    }), b.browser = function (a, b) {
        a = {ie: "msie"}[a] || a;
        var c = g[a + b];
        return undefined !== c ? c : f[a] ? b && b != f.version ? c = !1 : c = !0 : c = !1
    }, b.activity = function (a) {
        return a || (a = 30), new Date - e < a * 1e3
    }, b.isNew = function () {
        var a = new Date, b = "0" + (a.getMonth() + 1), c = "0" + a.getDate(), e = a.getFullYear().toString().substr(2) + b.substr(b.length - 2) + c.substr(c.length - 2), f = d.getCookie("MEILISHUO_GLOBAL_KEY");
        if (!f)return!1;
        var g = f.substr(17, 6) == e;
        return g
    }
});
fml.define("app/logstatics", ["jquery"], function (a, b) {
    var c = a("jquery");
    b.clicklog = function (a) {
        var b = new Image;
        b.src = a
    }, b.clickgetlog = function (a) {
        c.get(a)
    }
});
fml.define("app/emoji", [], function (a, b) {
    var c = {"笑": 1, "色色": 24, "酷": 9, "流泪": 6, "抓狂": 8, "坏笑": 11, "害羞": 4, "财迷": 19, "猪头": 13, "调皮": 25, "转眼珠": 16, "泪汪汪": 3, "星星眼": 20, "飞吻": 23, "长草": 18, "晕死": 2, "问号": 5, "刚巴德": 17, "拒绝": 26, "得意": 7, "鄙视": 22, "猥琐": 14, "囧": 15, "怒": 10, "心碎": 12, "白菜": 21, "骷髅": 27, "泪": 28, "汗": 29, "么么": 30, "如花": 31, "思考": 32}, d = {dynamic: {path: "20150108dynamic/", data: {OK: "OK.gif", "大哭": "大哭.gif", "擦汗": "擦汗.gif", "害羞ing": "害羞ing.gif", "好样的": "好样的.gif", "被安慰": "被安慰.gif", "糗": "糗.gif", "大笑": "大笑.gif", "查找": "查找.gif", "得意ing": "得意ing.gif", "害羞啦": "害羞啦.gif", "送飞吻": "送飞吻.gif", "耶": "耶.gif", "委屈": "委屈.gif", "欣慰": "欣慰.gif", "愤怒ing": "愤怒ing.gif", "对手指": "对手指.gif", "逛街去": "逛街去.gif", "赞": "赞.gif", "小贵": "小贵.gif", "生日": "生日.gif", "抓狂ing": "抓狂ing.gif", "心碎啦": "心碎啦.gif", "鄙视你": "鄙视你.gif", "雷": "雷.gif", "干杯": "干杯.gif", "生气": "生气.gif", "一般般": "一般般.gif", "抓狂啦": "抓狂啦.gif", "长草啦": "长草啦.gif", "乐奔": "乐奔.gif", "广播": "广播.gif", "疑问": "疑问.gif", "偷偷笑": "偷偷笑.gif", "抠鼻孔": "抠鼻孔.gif", "骷髅啊": "骷髅啊.gif", "亲亲": "亲亲.gif", "得意": "得意.gif", "睡觉": "睡觉.gif", "发福利": "发福利.gif", "晕死啦": "晕死啦.gif", "囧的一笔": "囧的一笔.gif", "再见": "再见.gif", "微笑": "微笑.gif", "花痴": "花痴.gif", "吃零食": "吃零食.gif", "有疑问": "有疑问.gif", "星星眼啊": "星星眼啊.gif", "叫兽": "叫兽.gif", "思考": "思考.gif", "调皮": "调皮.gif", "吐舌头": "吐舌头.gif", "汗。。": "汗。。.gif", "欢迎光临": "欢迎光临.gif", "可怜": "可怜.gif", "抱抱": "抱抱.gif", "谢谢": "谢谢.gif", "在路上": "在路上.gif", "没钱了": "没钱了.gif", "泪汪汪的": "泪汪汪的.gif", "叹气": "叹气.gif", "抱歉": "抱歉.gif", "转眼": "转眼.gif", "坏笑中": "坏笑中.gif", "流口水": "流口水.gif", "猥琐大花": "猥琐大花.gif", "呕吐": "呕吐.gif", "握手": "握手.gif", "闭嘴": "闭嘴.gif", "大哭中": "大哭中.gif", "流鼻血": "流鼻血.gif", "哭泣": "哭泣.gif", "握爪": "握爪.gif", "震惊": "震惊.gif", "大白菜": "大白菜.gif", "甩头发": "甩头发.gif", "坏笑": "坏笑.gif", "摊手": "摊手.gif", "鼓掌": "鼓掌.gif", "大笑中": "大笑中.gif", "色色的": "色色的.gif", "感谢": "感谢.gif"}}}, e = function (a, b) {
        return b.path = b.path || "", '<img class="facetableSetxy" title="[' + a + ']" src="http://i.meilishuo.net/css/images/face/' + b.path + b.data[a] + '">'
    }, f = function (a) {
        var b, c;
        for (var f in d) {
            c = d[f];
            for (var g in c.data)b = new RegExp("\\[" + g + "\\]", "g"), a = a.replace(b, e(g, c))
        }
        return a
    };
    b.data = c, b.data_new = d, b.emo2img = f
});
fml.define("app/setSync", ["jquery"], function (a, b) {
    var c = a("jquery");
    b.setShareTips = function () {
        function f(b, c, e) {
            c.attr("s_type", b);
            var f = d[e];
            switch (b) {
                case 0:
                    c.attr("title", a[e].not_auth), c.removeClass("i_" + f).addClass("g_" + f);
                    break;
                case 1:
                    c.attr("title", a[e].syn), c.removeClass("g_" + f).addClass("i_" + f);
                    break;
                case 2:
                    c.attr("title", a[e].not_syn), c.removeClass("i_" + f).addClass("g_" + f);
                    break;
                case 3:
                    c.attr("title", a[e].not_syn), c.removeClass("i_" + f).addClass("g_" + f)
            }
        }

        function g(a, d, e) {
            switch (a) {
                case 0:
                    f(1, d, e), fml.vars[e] = 1, window.open(b[e].not_auth, "mb", ["toolbar=0,status=0,resizable=1,width=620,height=450,left=", (screen.width - 620) / 2, ",top=", (screen.height - 450) / 2].join(""));
                    break;
                case 1:
                    f(2, d, e), c.get("/aj/setting/sync_button", {op: "remove", type: e}), fml.vars[e] = 2;
                    break;
                case 2:
                    f(1, d, e), c.get("/aj/setting/sync_button", {op: "add", type: e}), fml.vars[e] = 1;
                    break;
                case 3:
                    f(1, d, e), fml.vars[e] = 1, window.open(b[e].not_auth, "mb", ["toolbar=0,status=0,resizable=1,width=620,height=450,left=", (screen.width - 620) / 2, ",top=", (screen.height - 450) / 2].join(""))
            }
        }

        var a = {weibo: {not_auth: "你还没有绑定新浪微博，点击去绑定", not_syn: "未同步到新浪微博", syn: "取消同步到新浪微博"}, qzone: {not_auth: "你还没有绑定QQ空间，点击去绑定", not_syn: "未同步到QQ空间", syn: "取消同步到QQ空间"}}, b = {weibo: {not_auth: "/settings/bind/weibo"}, qzone: {not_auth: "/settings/bind/qzone"}}, d = {weibo: "sina", qzone: "qzone"}, e = c(".share_published");
        e.children("span").each(function () {
            var a = c(this), b = a.attr("s_type"), d = a.attr("s_name");
            b = b == "undefined" ? 0 : parseInt(b), typeof fml.vars[d] != "undefined" && (b = fml.vars[d]), f(b, a, d), a.unbind("click").click(function () {
                b = parseInt(c(this).attr("s_type")), g(b, a, d)
            })
        })
    }
});
fml.define("component/cursorPostion", ["jquery"], function (a, b) {
    var c = a("jquery");
    return{getCursortPosition: function (a) {
        a = c(a)[0];
        var b = 0;
        if (document.selection) {
            a.focus();
            var d = document.selection.createRange();
            d.moveStart("character", -a.value.length), b = d.text.length
        } else if (a.selectionStart || a.selectionStart == "0")return b = a.selectionStart, b
    }, setCaretPosition: function (a, b) {
        a = c(a)[0];
        if (a.setSelectionRange)a.focus(), a.setSelectionRange(b, b); else if (a.createTextRange) {
            var d = a.createTextRange();
            d.collapse(!0), d.moveEnd("character", b), d.moveStart("character", b), d.select()
        }
    }, getSelection: function (a) {
        var b, d, e, f;
        a = c(a);
        if (a[0].selectionStart == undefined) {
            var g = document.selection;
            if (a[0].tagName.toLowerCase() != "textarea") {
                var h = a.val();
                e = g.createRange().duplicate(), e.moveEnd("character", h.length), b = e.text == "" ? h.length : h.lastIndexOf(e.text), e = g.createRange().duplicate(), e.moveStart("character", -h.length), d = e.text.length
            } else e = g.createRange(), f = e.duplicate(), f.moveToElementText(a[0]), f.setEndPoint("EndToEnd", e), b = f.text.length - e.text.length, d = b + e.text.length
        } else b = a[0].selectionStart, d = a[0].selectionEnd;
        var i = a[0].value.substring(b, d);
        return{start: b, end: d, text: i}
    }}
});
fml.define("component/select", ["jquery", "component/regString"], function (a, b) {
    var c = a("jquery"), d = a("component/regString");
    return{createSelect: function (a, b) {
        function g(a) {
            arr = [], arr.push('<div class="selectPanel">'), arr.push('<div class="select"><div class="selectText" val="' + a.find("option:selected").attr("id") + '" >' + d.escapeString(a.find("option:selected").text()) + '</div><div class="selectBtn"></div></div>'), arr.push('<div class="options" >'), arr.push("<ul></ul>"), arr.push("</div>"), arr.push("</div>");
            var e = c(arr.join(""));
            a.before(e);
            var f = a.find("option"), g = f.size(), h = [];
            for (var i = 0; i < g; i++) {
                var j = d.escapeString(f.eq(i).val());
                h.push('<li role="' + f.eq(i).attr("role") + '" id="' + f.eq(i).attr("id") + '"  value="' + j + '">' + j + "</li>")
            }
            c(e).find(".options ul").html(h.join("")), b && b(e), c(".createPanel").bind("click", function (a) {
                c(".options").show()
            }), c(e).find(".select").bind("click", function (a) {
                c(this).attr("isSelect") != "true" ? (c(this).css({visibility: "hidden"}), c(e).find(".options").show(), c(this).attr("isSelect", "true")) : (c(this).css({visibility: "visible"}), c(e).find(".options").hide(), c(this).removeAttr("isSelect"))
            }), c(e).delegate(".options ul li", "mouseover", function () {
                c(this).css({background: "#ffeef4"})
            }), c(e).delegate(".options ul li", "mouseout", function () {
                c(this).css({background: "#fff"})
            }), c(e).delegate(".options ul li", "click", function () {
                c(e).find(".selectText").text(c(this).text()), c(e).find(".selectText").attr("val", c(this).attr("id")), a.attr("val", c(this).text()), c(e).find(".options").hide(), c(e).find(".select").css("visibility", "visible").removeAttr("isSelect")
            }), c(e).find(".select").hover(function () {
                c(this).addClass("selectbg")
            }, function () {
                c(this).removeClass("selectbg")
            })
        }

        a = c(a);
        var e = a.size();
        a.css("display") == "none" && a.prev().remove(), a.hide();
        for (var f = 0; f < e; f++)g(a.eq(f))
    }}
});
fml.define("app/insertAtCaret", ["jquery"], function (a, b) {
    var c = a("jquery");
    return function (a, b) {
        typeof a[0].name != "undefined" && (a = a[0]);
        if (c.browser.msie)a.focus(), setTimeout(function () {
            sel = document.selection.createRange(), sel.text = b, a.focus()
        }, 10); else if (c.browser.mozilla || c.browser.webkit || c.browser.chrome) {
            var d = a.selectionStart, e = a.selectionEnd, f = a.scrollTop;
            a.value = a.value.substring(0, d) + b + a.value.substring(e, a.value.length), a.focus(), a.selectionStart = d + b.length, a.selectionEnd = d + b.length, a.scrollTop = f
        } else a.value += b, a.focus()
    }
});
fml.define("app/groupApi", ["component/ajax"], function (a, b) {
    var c = a("component/ajax"), d = {elite: "/aj/magazine/twitter_elite", user_groups: "/aj/magazine/user_groups", remove: "/aw/group/remove", create: "/aw/group/create"}, e = {style: "/aj/magazine/group_style", quit: "/aj/magazine/quit", follow: "/aj/magazine/follow"};
    b.groupApi = function (a, b, f) {
        a in d ? c.aw(d[a], b, f) : a in e && c.aj(e[a], b, f)
    }
});
fml.define("component/ajax", ["jquery"], function (a, b) {
    function d(a) {
        return function (d, e, f, g) {
            "function" == typeof e && (f = e, e = {}), c.ajax({type: a, url: d, dataType: "json", data: e, success: f, error: function (a, c) {
                g && g(a.status, a.responseText, c), b.callOnErr && b.callOnErr(a.status, a.responseText, c)
            }})
        }
    }

    var c = a("jquery");
    b.callOnErr = null, b.aw = d("post"), b.aj = d("get")
});
fml.define("app/closeWindow", [], function (a, b) {
    return function () {
        var a = navigator.appName;
        a == "Netscape" ? (window.open("", "_self", ""), window.close()) : a == "Microsoft Internet Explorer" && (window.opener = null, window.open("", "_top"), window.close())
    }
});
fml.define("app/checkStatusCode", [], function (a, b) {
    return function (a, b) {
        var c = {"-2": "您发布的内容含有屏蔽词，请修改后重新发送", 99: "您发布的链接不符合规范，请修改后重新发送", 98: "您发布的时间间隔太短了，休息一下再发布吧", 97: "您发布的时间间隔太短了，休息一下再发布吧", 96: "您创建杂志过多，休息一会吧", 95: "你@的人太多了，请修改后再发送"};
        return c[a] ? (b ? b() : alert(c[a]), !0) : !1
    }
});
fml.define("app/smile", ["jquery", "component/shareTmp", "app/insertAtCaret", "app/emoji"], function (a, b) {
    var c = a("jquery"), d = a("component/shareTmp"), e = a("app/insertAtCaret"), f = c(".smileysbox"), g = a("app/emoji"), h = {smileys: g.data}, i = function (a) {
        var b = f.size() == 0;
        if (b) {
            var e = d("loginSmile", h);
            c("body").append(e), f = c(".smileysbox"), f.on("click", ".smiley img", function () {
                j.call(this)
            })
        }
        a(f)
    }, j = function () {
    }, k = function (a, b, d) {
        var g = "smileys_active";
        if (d == "publish" || d == "im")g = "active";
        d != "publish" && d != "twitter" && c(document).bind("click", function () {
            c(b).removeClass(g).removeData("isAddClass"), c(".share_smileys").removeData("isAddClass"), f.hide()
        }), objs = c(a), objs.on("click", b, function (h) {
            h.stopPropagation(), c(b).removeClass(g);
            var k = c(this), l = k.offset();
            i(function (b) {
                j = function () {
                    if (d == "share")c("#forwardContent").val() == "写点什么,评论一下" ? (c("#forwardContent").val(""), e(c("#forwardContent"), c(this).attr("emotion"))) : e(c("#forwardContent"), c(this).attr("emotion")); else if (d == "im")e(k.parents(".im_inputbox").find("textarea"), c(this).attr("emotion")); else if (d == "comment") {
                        var f = k.closest(".poster_wall").find(".poster_textarea");
                        e(f, c(this).attr("emotion"))
                    } else d == "twitter" ? e(k.parents(".reply_box").find(".comment_textarea"), c(this).attr("emotion")) : (d == "publish" || d == "recom_publish") && e(c(a).find(".editor"), c(this).attr("emotion"));
                    k.removeClass(g), k.removeData("isAddClass"), b.hide()
                }
            }), d == "share" ? f.css("zIndex", 815) : d == "comment" && (f.css("zIndex", 380), c(".share_smileys").css("zIndex", 390));
            if (!k.data("isAddClass")) {
                k.addClass(g), k.data("isAddClass", "true"), f.show();
                var m = l.left - 264, n = l.top + k.height() + 4;
                m < 0 ? (m = 0, f.find(".line").css({left: "177px"})) : f.find(".line").css({left: "264px"}), d == "publish" ? (m = l.left, n -= 4, f.find(".line").css({left: "0px", width: "54px"})) : d == "twitter" || d == "recom_publish" ? (m = l.left, f.find(".line").css({left: "0px"})) : d == "im" && (m = l.left, n = l.top - f.outerHeight(), f.find(".line").hide()), f.css({top: n, left: m})
            } else k.removeClass(g), k.removeData("isAddClass"), f.hide()
        })
    };
    b.showSmile = k
});
fml.define("app/magazine", ["jquery", "app/groupApi", "app/smile", "app/checkStatusCode", "component/iStorage", "app/insertAtCaret", "component/shareTmp", "component/select", "component/focus", "component/cursorPostion", "component/regString", "app/setSync"], function (a, b) {
    var c = a("jquery"), d = a("component/shareTmp"), e = a("component/focus"), f = a("component/select"), g = a("app/smile"), h = a("app/insertAtCaret"), i = !0, j = a("component/iStorage"), k = a("component/cursorPostion");
    fml.vars.newMagazineList = "";
    var l = a("app/checkStatusCode"), m = a("component/regString"), n = a("app/groupApi").groupApi, o = a("app/setSync");
    return function () {
        j.get(Meilishuo.config.user_id, function (a) {
            a = c.parseJSON(a) || {};
            var b = fml.vars.groupName || m.escapeString(a.magazineName), h = fml.vars.groupId || a.magazineId;
            if (c(".forwardMagazin").size() == 0) {
                var k = d("shareGoodsUploadPanelTpl");
                c(".add_share_goods").append(k), o.setShareTips();
                var l = c("#createPanel").show();
                c(".selectList").html(fml.vars.newMagazineList), f.createSelect(".selectList", function (a) {
                    a.find(".options ul").after(l), a.find(".options ul").children("[role=1]:last").addClass("border_bc"), e.inputFocus("#createMagaValue"), b && (c(".selectText").html(b), c(".selectText").attr("val", h), c(".selectList").attr("val", b), c(".selectList").attr("id", h))
                })
            }
            fml.vars.newMagazineList == "" && (c(".selectText").text("读取数据中..."), n("user_groups", {}, function (a) {
                for (var d = 0, g = a.length; d < g; d++) {
                    var i = a[d];
                    fml.vars.newMagazineList += '<option role="' + i.role + '" id="' + i.group_id + '" value="' + m.escapeString(i.name) + '" >' + m.escapeString(i.name) + "</option>";
                    if (b && m.escapeString(b) == i.name)var j = !0
                }
                c(".selectList").html(fml.vars.newMagazineList), f.createSelect(".selectList", function (a) {
                    a.find(".options ul").after(l), a.find(".options ul").children("[role=1]:last").addClass("border_bc"), e.inputFocus("#createMagaValue"), b && j && (c(".selectText").html(b), c(".selectText").attr("val", h), c(".selectList").attr("val", b), c(".selectList").attr("id", h))
                })
            })), e.inputFocus("#forwardContent"), c(".forwardMagazin").on("click", ".options ul li", function () {
                j.set(Meilishuo.config.user_id, '{"magazineName" : "' + m.escapeString(c(this).text()) + '"' + ' , "magazineId" : ' + '"' + c(this).attr("id") + '"' + "}")
            }), c(".createMaga").live("click", function () {
                var a = c(this).parent().find("#ForwardMsg"), b = c(this).parent().find("#createMagaValue").val();
                a.hide();
                if (b == "" || b == "创建一个杂志")return a.show().html("杂志名称不能为空哦!"), !1;
                var d = /[\$|&|#|\|"| |]/.test(b);
                if (d)return a.show().html("杂志名称含有非法字符!"), !1;
                a.show().html("正在创建...");
                var e = c(this), f = {name: b}, g = function (d) {
                    if (d.code)a.html(d.msg).show(); else {
                        var f = c('<li class="l22 f14n p5" role="1" value="' + m.escapeString(b) + '" id="' + d.data + '">' + m.escapeString(b) + "</li>"), g = e.parent().prev().children(":first");
                        g.length > 0 ? g.before(f) : e.parent().prev().append(f);
                        var h = e.parent().parent().parent().next(), j = '<option value="' + m.escapeString(b) + '" id="' + d.data + '" >' + m.escapeString(b) + "</option>";
                        h.prepend(j), c("#createMagaValue").val("创建一个杂志"), f.trigger("click"), fml.vars.newMagazineList = "", a.hide()
                    }
                    i = !0
                };
                i && (n("create", f, g), i = !1)
            }), g.showSmile(".forwardMagazin", ".share_smileys", "share")
        })
    }
});
fml.define("app/newMagazine", ["jquery", "app/groupApi", "component/focus", "app/checkLogin", "app/checkStatusCode", "component/shareTmp", "ui/dialog"], function (a, b) {
    function k() {
        var a = d("createMagazinePanelTpl"), b = c(a).show(), g = new f({title: "创建杂志", content: b});
        e.inputFocus(".maga_title"), j == "" ? i("style", {}, function (a) {
            c.each(a, function (a, b) {
                j += '<li><input type="radio" value="' + b.group_id + '" name="group_style" />' + b.group_desc + " </li>"
            }), c("#magaTyepList").html(j), c(".showMagazine").hide(), c(".add_share_goods").show()
        }) : c("#magaTyepList").html(j)
    }

    function l() {
        var a = c(".maga_title").val();
        if (a == "" || a == "20个字以内")return c("#createMagaMsg").show().html("杂志社名称不能为空哦!"), !1;
        var b = /[\$|&|#|\|"| |]/.test(a);
        if (b)return c("#createMagaMsg").show().html("杂志社名称含有非法字符!"), !1;
        if (c("#magaTyepList input[type=radio]:checked").length == 0)return c("#createMagaMsg").show().html("请选择分类"), !1;
        var d = c("#magaTyepList input[type=radio]:checked").val(), e = c(".maga_title").val(), f = {name: e, "class": d}, g = function (a) {
            a.code ? c("#createMagaMsg").html(a.msg).show() : (window.location.href = Meilishuo.config.server_url + "group/" + a.data, selectRequestData = null, selectRequestDataShare = null)
        };
        i("create", f, g), c("#createMagaMsg").show().html("创建中...")
    }

    var c = a("jquery"), d = a("component/shareTmp"), e = a("component/focus"), f = a("ui/dialog"), g = a("app/checkStatusCode"), h = a("app/checkLogin"), i = a("app/groupApi").groupApi, j = "";
    b.newMeiliMagazine = function (a, b) {
        c(a).bind("click", function () {
            if (b && !h())return!1;
            k(), c("#createMagazine").click(l)
        })
    }
});
fml.define("component/regString", [], function (b, c) {
    var d = null, e = function (a, b) {
        var c = 0, d = 0;
        for (var e = a.length; d < e;) {
            var f = "";
            f = a.charAt(d), /[^\x00-\xff]/.test(f) ? c += 2 : c += 1, d++;
            if (c >= b * 2)break
        }
        return d
    };
    return{isUrl: function (a) {
        this.trim(a);
        var b = "((^http)|(^https)|(^ftp))://[-\\w]+\\.(\\w)+", c = new RegExp(b);
        return c.test(a) ? !0 : !1
    }, trim: function (a) {
        return a.trim ? a.trim() : a.replace(/^\s+/, "").replace(/\s+$/, "")
    }, GetStringLength: function (a) {
        var b = 0;
        for (var c = 0; c < a.length; c++) {
            var d = a.charCodeAt(c);
            d >= 1 && d <= 126 || 65376 <= d && d <= 65439 ? b += .5 : b += 1
        }
        return b
    }, getStringLength: function (a) {
        return a.replace(/[^\x00-\xff]/g, "**").length / 2
    }, WidthCheck: function (a, b) {
        return this.GetStringLength(a) > b ? !1 : !0
    }, cutstrX: function (a, b, c) {
        return!a || 0 == a.length ? "" : (undefined == c && (c = "..."), b = e(a, b), a.substr(0, b) + (c && a.length > b ? c : ""))
    }, cutstr: function (b, c, d) {
        var e = 0, f = 0;
        str_cut = "", f = b.length, undefined == d && (d = "...");
        for (var g = 0; g < f; g++) {
            a = b.charAt(g), e++, escape(a).length > 4 && e++, str_cut += a;
            if (e > c)return str_cut += d, str_cut
        }
        if (e <= c)return b
    }, escapeString: function (a) {
        return!a || a == "" ? "" : a.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;")
    }}
});
fml.define("app/twitterApi", ["component/ajax"], function (a, b) {
    var c = a("component/ajax"), d = {fetch: "/aj/twitter/fetch", create: "/aw/twitter/create", like: "/aw/twitter/like", destroy: "/aw/twitter/destroy", destroy_spam: "/aw/twitter/destroy_spam"};
    b.twitterApi = function (a, b, e, f) {
        a in d && c.aw(d[a], b, e, f)
    }
});
fml.define("app/dialogSuccess", ["jquery", "component/urlHandle", "app/closeFrame", "component/regString", "component/shareTmp", "ui/dialog", "app/closeWindow"], function (a, b) {
    var c = a("jquery"), d = a("component/shareTmp"), e = a("ui/dialog"), f = a("app/closeFrame"), g = a("app/closeWindow"), h = a("component/regString"), i = a("component/urlHandle").getUrl(window.location.href), j = function (a, b, j, k) {
        var l = {};
        l.magaName = h.cutstr(h.escapeString(a), 20), l.magaId = b, l.magaTitle = j;
        var m = k == "分享按钮" ? d("shareMagaSucTpl") : d("magaSucTpl", l), n = k == "分享按钮" ? 520 : 370;
        k == "分享按钮" && (j = "提示");
        var o = new e({title: j, content: c(m), width: n, onStart: function () {
            c(".smileysbox").hide()
        }, onClose: function () {
            k && (k == "分享按钮" ? g() : f()), document.referrer.indexOf("meilishuo_share") > -1 && window.close()
        }});
        k == "分享按钮" && (o.drive.overlay.destroy(), c("#dialogLayer").css({top: "60px", "margin-left": "auto", "margin-right": "auto", position: "static"}).find("#closeDialog").hide()), window.setTimeout(function () {
            o.drive.destroyModel()
        }, 2e3), (k == 3 || k == "pickup") && parent == self && !i.mlsshare && history.go(-1)
    };
    b.shareSuccess = j
});
fml.define("ui/alert", ["component/windowDrive", "jquery"], function (a, b) {
    function e(a) {
        return this.opts = a || {}, this.drive = new d(this.opts), this.opts.auto || this.sync(), this
    }

    function f() {
        var a = "";
        if (!this.opts.noConfirmBtn) {
            var b = this.opts.confirmTxt || "确定";
            a = '<p class="tab_sure"><a class="sure btn sureBtn">' + b + "</a></p>"
        }
        return this.opts.discover ? c('<div class="alert_tips">' + this.opts.content + a + "</div>") : c('<div class="maga_suc">' + this.opts.content + a + "</div>")
    }

    var c = a("jquery"), d = a("component/windowDrive");
    return e.prototype.sync = function () {
        this.opts.disOverlay || this.drive.createOverlay(), this.drive.createWindow();
        var a = f.call(this);
        this.drive.window.content.html(a), c("." + this.drive.window.opts.windowId).on("click", ".sureBtn", c.proxy(function () {
            if (this.callBackOnSure && this.callBackOnSure() == 0)return!1;
            this.drive.destroyModel()
        }, this))
    }, e.prototype.onSure = function (a) {
        this.callBackOnSure = a
    }, e
});
fml.use("app/cleanMsg", function (a) {
    Meilishuo.config.is_iPad || a.msgFunc()
}), fml.use("app/at", function () {
    this(".__atName", ".atDiv")
}), fml.use("app/setting", function () {
}), fml.use(["page/common/shopping_carts", "jquery"], function () {
    var a = this.jquery, b = this.shopping_carts;
    a("#headLogoutBtn").click(function () {
        b.clearCartsNumCache()
    })
}), fml.define("page/common/global_login", [], function () {
    Meilishuo.config.need_active && (window.location.href = "/user/activeAccount/")
});
fml.define("app/focus_banner", ["component/windowResize", "jquery"], function (a, b) {
    function f(a, b) {
        if (b.btn)return c(b.btn)
    }

    function g(a, b) {
        a = c(a);
        var d = a.attr(b.data_attr);
        if (!d)return;
        a.css("background-image", "url(" + d + ")").removeAttr(b.data_attr)
    }

    function h(a, b, d) {
        function h() {
            if (e >= f)return;
            if (b.process.loaded[e])return;
            var c = a.eq(e).find("[" + b.data_attr + "]");
            b.process.loaded[e] = !0, c.each(function () {
                g(this, b)
            }), e++, window.setTimeout(h, b.setting.stay - 10)
        }

        if (!b.data_attr)return;
        var e = d || 0, f = a.length;
        a = c(a), h()
    }

    function i(a, b, d, e, f) {
        if (undefined == b) {
            e.process.stage.css({position: "relative", overflow: "hidden"}), e.process.stage.css({cursor: "pointer"}), a.each(function (a) {
                c(this).css({position: "absolute", top: 0, left: 0, "z-index": a === d ? 2 : 0})
            }), f && f(d);
            return
        }
        var b = a.eq(b), d = a.eq(d);
        if (e.setting.speed) {
            d.css("z-index", 1);
            function g(a) {
                b.css({"z-index": 0, left: 0, top: 0}).show(), d.css("z-index", 2), f && f(d)
            }

            switch (e.transition) {
                case"fade":
                    b.stop(!0, !0).fadeOut(e.setting.speed, g);
                    break;
                case"slideV":
                    var h = "stageHeight", i = 1, j = "top";
                    break;
                case"slideH":
                    var h = "stageWidth", i = -1, j = "left"
            }
            if (h) {
                var k = {};
                k[j] = i * e.process[h], b.stop(!0, !0).animate(k, e.setting.speed, g)
            }
        } else b.css("z-index", 0), d.css("z-index", 2), f && f(d)
    }

    function j(a, b, e, f, g) {
        var h = f.process;
        if (undefined == b && "scrollH" == f.transition) {
            var i = h.stageWidth;
            h.stage.css({position: "relative"});
            function j(b) {
                a.each(function (a, d) {
                    c(d).css({position: "absolute", width: b, left: a * b, top: 0})
                })
            }

            j(i), d.bind(function () {
                h.stageWidth = h.stage.width() + parseInt(h.stage.css("margin-left")), j(h.stageWidth)
            })
        }
        if ("scrollV" == f.transition)var k = "margin-top", l = "stageHeight"; else var k = "margin-left", l = "stageWidth";
        var m = {};
        m[k] = -e * h[l], h.stage.stop(!0, !0).animate(m, f.setting.speed, g)
    }

    function k(a, b, c, d) {
        function l(a) {
            e.animating = !1, d && d(a)
        }

        var e = c.process, f = e.last, g = e.index;
        g < 0 && (e.index = g = a.length - 1), g >= a.length && (e.index = g = 0), e.timer && window.clearTimeout(e.timer), c.setting.stay && (e.timer = window.setTimeout(function () {
            e.index++, k(a, b, c, d)
        }, c.setting.stay));
        if (f === g)return;
        e.loaded[g] || h(a, c, g), e.animating = !0, undefined != f && c.fcsCls && b.eq(f).removeClass(c.fcsCls), c.fcsCls && b.eq(g).addClass(c.fcsCls);
        switch (c.transition) {
            case"slideH":
            case"slideV":
            case"tab":
            case"fade":
                i(a, f, g, c, l);
                break;
            case"scrollV":
            case"scrollH":
                j(a, f, g, c, l)
        }
        e.last = g
    }

    function l(a, b, d) {
        var e = d.process;
        e.index = d.process.index, k(a, b, d, d.cbk), d.toprev && c(d.toprev).bind(d.btnEvent, function () {
            e.index -= 1, k(a, b, d, d.cbk)
        }).bind("mouseover", function () {
            e.stage.trigger("mouseover")
        }).bind("mouseout", function () {
            e.stage.trigger("mouseout")
        }), d.tonext && c(d.tonext).bind(d.btnEvent, function () {
            e.index += 1, k(a, b, d, d.cbk)
        }).bind("mouseover", function () {
            e.stage.trigger("mouseover")
        }).bind("mouseout", function () {
            e.stage.trigger("mouseout")
        }), b.bind(d.btnEvent, function () {
            if (d.btnStepAttr) {
                var f = c(this).attr(d.btnStepAttr) * 1;
                e.index += f
            } else {
                var f = c(this).data("_fi");
                undefined === f && (f = c(this).index(), c(this).data("_fi", f)), e.index = f
            }
            k(a, b, d, d.cbk)
        }), e.stage.bind("mouseover", function () {
            e.timer && window.clearTimeout(e.timer)
        }).bind("mouseout", function () {
            if (e.animating)return;
            e.timer = window.setTimeout(function () {
                e.index++, k(a, b, d, d.cbk)
            }, d.setting.stay / 3)
        }), c(".banner").bind("mouseover", function () {
            c(d.btnpn).show()
        }).bind("mouseout", function () {
            c(d.btnpn).hide()
        })
    }

    function m(a) {
        a = c.extend({}, e, a), a.process = {loaded: {}}, a.process.index = +a.index || 0;
        if (!a.unit)throw"unit is not config";
        var b = c(a.unit), d = a.stage ? c(a.stage) : b.parent();
        a.process.stage = d, a.process.stageWidth = d.width(), a.process.stageHeight = d.height();
        var g = f(b, a);
        l(b, g, a)
    }

    var c = a("jquery"), d = a("component/windowResize"), e = {unit: !1, btn: !1, btnpn: !1, btnEvent: "click", fcsCls: "current", transition: "fade", data_attr: "data-img", setting: {stay: 5e3, speed: 500}};
    b.bind = m
});
fml.define("app/eventHover", ["jquery"], function (a, b) {
    var c = a("jquery");
    b.hoverShow = function (a, b) {
        c(a).live("mouseenter", function () {
            c(this).find(b).css("display", "block")
        }).live("mouseleave", function () {
            c(this).find(b).hide()
        })
    }, b.hoverHide = function (a, b) {
        c(a).live("mouseenter", function () {
            c(this).find(b).hide()
        }).live("mouseleave", function () {
            c(this).find(b).show()
        })
    }
});
fml.define("page/common/shopping_carts", ["jquery", "component/iStorage", "ui/alert", "component/ajax", "core/animation", "component/callApi"], function (a, b) {
    function m() {
        if (!l.aw || !l.animate)return;
        var a = l.res, b;
        a ? a.code && (b = a.info.msg) : b = "opps,有点错误,一会儿再试试吧";
        if (b)(new f({width: 370, title: "我的购物车", confirmTxt: a && "去整理购物车", content: b})).onSure(function () {
            a && window.open("/cart")
        }); else {
            var c = a.info;
            c && c.contain && o(c.contain)
        }
    }

    function n(a, b, d, e) {
        function v() {
            var a = i.Cubic.easeOut(r, o.top, s, q), b = r / q * g;
            r++, h.css({top: a, width: t * b, height: u * b}), a > o.top + s ? j(v) : (o.top = a, r = 0, q = 25, w())
        }

        function w() {
            var a = i.Quart.easeIn(r, o.top, p.top - o.top, q), b = i.Linear(r, o.left, p.left - o.left, q);
            r++, h.css({left: b, top: a}), b <= p.left ? j(w) : x()
        }

        function x() {
            h.remove(), l.animate = !0, m(), e && e()
        }

        var f = a.find("img").attr("src"), g = .5;
        if (f)var h = c('<div style="z-index:9;display:block;position:absolute;border:1px solid #ccc;"><img src="' + f + '" style="width:100%;height:100%;"/></div>'); else {
            var h = c('<div style="z-index:9;display:block;position:absolute;font-size:70%;background:#f7f7f7;text-align:center;border:3px solid #f7f7f7;">' + a.text() + "</div>");
            g = .7
        }
        h.css("overflow", "hidden").width(0).height(0), b = c(b), d = c(d);
        var k = b.offset(), n = d.offset(), o = {left: k.left + b.width() * .4, top: k.top}, p = {left: n.left, top: n.top + d.height()};
        h.css(o);
        var q = 30, r = 0, s = -50, t = a.width(), u = a.height();
        v(), c("body").append(h)
    }

    function o(a, d) {
        var e = c(".bot_cart .cart_nums"), f = c(".mycart .num_bgc");
        a > 0 ? (e.text(a).show(), f.removeClass("num_bgc_none").text(a)) : (e.hide(), f.addClass("num_bgc_none")), d || b.clearCartsNumCache()
    }

    var c = a("jquery"), d = a("core/animation"), e = a("component/ajax"), f = a("ui/alert"), g = a("component/iStorage"), h = a("component/callApi"), i = d.Tween, j = d.requestFrame, k = "numInCart", l = {};
});
fml.define("app/setting", ["jquery", "app/cleanMsg", "component/windowResize"], function (a, b) {
    function g(a, b, c) {
        if (!a.length || !b.length)return;
        var d = {left: (c ? 0 : a.offset().left) + a.width() - b.width() - 4, top: (c ? 0 : a.offset().top) + a.height()}, g;
        return a.hover(function () {
            var g = {left: d.left, top: d.top};
            if (c) {
                var h = a.offset();
                g.left += h.left, g.top += h.top
            }
            b.css(g).show(), f && clearTimeout(f), e(!1)
        }, function () {
            g = setTimeout(function () {
                b.hide()
            }, 10), f = setTimeout(function () {
                e(!0)
            }, 10)
        }), b.mouseenter(function () {
            e(!1), g && clearTimeout(g), f && clearTimeout(f)
        }).mouseleave(function () {
            b.hide(), e(!0)
        }), d
    }

    function h() {
        if (d.browser.msie && d.browser.version == "6.0") {
            var a = d(".h_update");
            a.length > 0 && a.css("display") != "none" && a.css({top: d(window).scrollTop() + 260 + "px"})
        }
    }

    var c = a("component/windowResize"), d = a("jquery"), e = a("app/cleanMsg").msgTipbox, f;
    Meilishuo.config.user_id != 0 && (c.bind(h), window.setTimeout(h, 300)), b.init = function () {
        window.setTimeout(h, 300)
    }
});
fml.define("app/referrer", ["component/urlHandle", "component/storage", "jquery"], function (a, b) {
    var c = a("jquery"), d = a("component/urlHandle"), e = a("component/storage"), f = "", g = function () {
        var a = document.referrer, b = d.getUrl(a), c = b.rootDomain, g = b.hostDomain;
        c != undefined && g != undefined && c != "meilishuo.com" && (c == "sina.com" || c == "weibo.com" ? e.setCookie("MEILISHUO_REFER", "weibo") : g == "c.gdt.qq.com" || g == "cn.qzs.qq.com" || b.qz_gdt || c == "qq.com" || c == "pengyou.com" || c == "gtimg.cn" ? e.setCookie("MEILISHUO_REFER", "gdt.qq") : c == "renren.com" ? e.setCookie("MEILISHUO_REFER", "renren") : b.frm == "gad" && e.setCookie("MEILISHUO_REFER", "others")), f = e.getCookie("MEILISHUO_REFER")
    };
    return g(), f
});
fml.define("page/im/open", ["jquery", "app/checkLogin", "component/urlHandle", "app/im/postMessage", "component/dragdrop"], function (a, b) {
    function k(a, b, c) {
        if (!c) {
            try {
                a.close(), alert("该店铺没有任何联系方式！")
            } catch (d) {
                console.log(d)
            }
            return
        }
        try {
            a.fml.vars.im.mustleave = 1
        } catch (d) {
            console.log(d)
        }
        var e = "http://wpa.qq.com/msgrd?v=3&uin=" + c + "&site=qq&menu=yes";
        b.href = e, b.setAttribute("target", "_blank"), a.name = "_qq_", a.location = e
    }

    function l(a, b, c) {
        try {
            b.href = "###" + [c.toid, "", c.shop_id, c.type, c.tid].join("-"), console.log(b.href), delete c.shop_id;
            var d = {fromid: c.from, toid: c.toid, tid: c.tid};
            if (c.win_type == "simple")var f = j.simple + "?" + e.http_build_query(d) + "&"; else var f = j.normal + "?" + e.http_build_query(d);
            i || !a.location || "about:blank" == a.location ? a.location = f : a.changeUser(c.toid)
        } catch (g) {
            console.log(g), a.location = f
        }
    }

    function m(a) {
        if (!d())return;
        a = a || {}, location.protocol === "https:" && (a.is_simple = 0);
        if (a.is_simple)var b = o({calltype: a.calltype}), c = j.simple; else var b = window.open("", "_im_", h), c = j.normal;
        try {
            if (!b.location || "about:blank" == b.location)b.location.href = c
        } catch (e) {
            console.log(e)
        }
        return b && b.focus(), !1
    }

    function n(a) {
        a = a || {}, c("#im_iframe_div,#closeImframeBtn,#im_iframe").remove()
    }

    function o(a) {
        function d() {
            c("#im_iframe_div").css({right: b.divRight + "px", bottom: b.divBottom + "px"}), c("#im_iframe").css({right: b.right + "px", bottom: b.bottom + "px"})
        }

        c(".bot_cart .openIM").stop().css("opacity", "1"), a = a || {};
        var b = {right: 38, bottom: 40, width: 570, height: 410, divWidth: 410, divHeight: 32, topBlank: 24, closeBtnWidth: 32};
        b.divRight = b.right, b.divBottom = b.bottom + b.height - b.divHeight - b.topBlank;
        var e = c("#im_iframe");
        if (e.length) {
            if (e.is(":visible"))return e[0].contentWindow;
            d(), c("#im_iframe_div").show(), e.show()
        } else {
            var g = c("<div />").attr("id", "im_iframe_div").css({width: b.divWidth + "px", height: b.divHeight + "px", position: "fixed", zIndex: 1001, right: b.divRight + "px", bottom: b.divBottom + "px", cursor: "move", opacity: "0.3"}).appendTo("body");
            c("<div />").attr("id", "closeImframeBtn").css({position: "fixed", width: b.closeBtnWidth + "px", height: b.closeBtnWidth + "px", zIndex: 1002, right: b.divRight + "px", bottom: b.divBottom + "px", cursor: "pointer", backgroundColor: "#f69", opacity: "0"}).insertAfter(g).on("click", function (a) {
                return n(), console.log("close"), !1
            }), e = c('<iframe id="im_iframe" frameborder="no" allowTransparency="true" />').css({width: b.width + "px", height: b.height + "px", position: "fixed", zIndex: 1e3, opacity: 1, right: b.right + "px", bottom: b.bottom + "px", border: "none"}).appendTo("body"), c("#im_iframe_div").draggable({do_not_restore: !0, start: function () {
                this.css({position: "absolute", top: this.offset().top - b.topBlank + "px", height: b.height + "px", width: b.width + "px", left: this.offset().left - (b.width - b.divWidth) + "px", backgroundColor: "#f69"}), c("#closeImframeBtn").hide()
            }, stop: function () {
                var a = this.offset().top - c(document).add(document.documentElement).scrollTop(), d = this.offset().left, e = c("body").width();
                a < 0 && (a = 0), d > e - b.width && (d = e - b.width), this.css({position: "fixed", top: a + b.topBlank + "px", height: b.divHeight + "px", width: b.divWidth + "px", left: d + (b.width - b.divWidth) + "px", backgroundColor: "transparent"}), c("#im_iframe").css({left: d + "px", top: a + "px"}), c("#closeImframeBtn").css({left: d + b.width - b.closeBtnWidth + "px", top: a + b.topBlank + "px"}).show()
            }})
        }
        return f.on("closeImframe", function () {
            n()
        }), e[0].contentWindow
    }

    var c = a("jquery"), d = a("app/checkLogin"), e = a("component/urlHandle"), f = a("app/im/postMessage");
    a("component/dragdrop");
    var g = Meilishuo.config.im_url, h = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=952, height=720", i = window.isPadApp, j = {simple: g + "www/simple/", normal: g + "www/"};
    b.reCallImWin = m, window.closeImframe = n;
    var p = 0;
    b.bind = function (a, b) {
        function f() {
            function v() {
                k(h, a, m), b.is_simple && c("#im_iframe_div,#closeImframeBtn,#im_iframe").hide()
            }

            if (!d())return!1;
            var a = this, f = a.hash;
            if ("###" != f.slice(0, 3))return!0;
            location.protocol === "https:" && (b.is_simple = 0);
            if (b.is_simple)var h = o(); else if (i)var h = window; else var h = window.open("", "_im_", e);
            if (!h)return!1;
            f = f.slice(3).split("-");
            var j = f[0], m = f[1], n = f[2], q = f[3], r = f[4], s = b.is_simple ? "simple" : "normal", t = Meilishuo.config.user_id, u = {shop_id: n, tid: r, type: q, from: t, source: "web"};
            return j < 0 ? m ? v() : (console.log("should close popup window"), alert("用户没有绑定沟通工具")) : (p = 1, c.getJSON(g + "im/init?callback=?", u).done(function (b) {
                p = 0;
                if (!b || 0 == b.successful || b.to <= 0)return v();
                var c = b.to * 1;
                u.toid = c, u.win_type = s, l(h, a, u)
            }).error(v)), h.focus(), !1
        }

        b = b || {};
        var e = b.popWin || h;
        typeof a == "string" ? c(a).click(f) : c(a.parent).on("click", a.self, f)
    }
});
fml.define("app/search", ["jquery", "component/regString", "component/shareTmp", "component/urlHandle", "component/cursorPostion"], function (a, b) {
    function w(a) {
        var b = c.trim(c(a).val());
        if (b == "" || u.getType() != h) {
            u.hide();
            return
        }
        v.changeField(".suggest_frm", ""), u.pullData()
    }

    function x() {
        var a, b = c.browser.msie && c.browser.version == "9.0", d = "oninput"in document, e = !1, g = f.getParams(location.search);
        g.searchKey && (e = !0, q.val(g.searchKey), v.changeType(n.find("span[data-type=" + (g.searchType || 1) + "]"))), n.delegate("span", "click", function () {
            v.changeType(this)
        }), d ? q.on("input", function (a) {
            w(this)
        }) : q.on("propertychange", function (a) {
            if (!u.isKeyupAjax) {
                u.isKeyupAjax = !0;
                return
            }
            w(this)
        }), q.on("focus", function () {
            if (e) {
                e = !1;
                return
            }
            clearTimeout(a), w(this)
        }), q.on("keyup", function (a) {
            var c = a.keyCode;
            if (c == 38 || c == 40) {
                u.isKeyupAjax = !1;
                var d = c == 38 ? "up" : "down";
                u.selectItem(d), v.changeField(".suggest_frm", "key")
            }
            b && c == 8 && w(this)
        }).on("blur", function () {
            a = setTimeout(function () {
                u.hide()
            }, 300), u.getType() != h && q.attr("placeholder", "")
        }), r.delegate("li", "mouseenter", function () {
            u.selectItem(c(this).index(), !0)
        }).delegate("li", "click", function () {
            v.changeField(".suggest_frm", "mouse"), q.val(c.trim(c(this).text())), v.submit()
        }), c(".ipt2").on("click", function () {
            var a = q.val(), b = "searchshop";
            u.getType() == h && (b = "searchgoods");
            var c = b + "=" + a;
            t.val(encodeURIComponent(c))
        })
    }

    var c = a("jquery"), d = a("component/regString"), e = a("component/shareTmp"), f = a("component/urlHandle"), g = a("component/cursorPostion"), h = 1, i = 2, j = 3, k = 4, l = ["goods", "user", "magazine", "shop"], m = c(".ser_n"), n = m.find(".search-table"), o = n.find(".list"), p = m.find(".cur"), q = m.find(".searchKey"), r = m.find(".searchType"), s = m.find(".searchBox"), t = c(".search"), u = {delayId: null, delayTime: 100, isKeyupAjax: !0, lastVal: "", url: "/aj/search/", searchCache: {}, hide: function () {
        r.hide()
    }, show: function () {
        r.show()
    }, getType: function () {
        return n.find(".cur").attr("data-type")
    }, render: function (a) {
        if (a.result) {
            var b = e("searchList", a);
            r.html(b), this.show()
        } else this.hide()
    }, pullData: function () {
        var a = this.getType(), b = c.trim(q.val());
        if (this.lastVal == b) {
            u.show();
            return
        }
        this.lastVal = b, this.searchCache[a] = this.searchCache[a] || {};
        var d = this.searchCache[a], e = this;
        clearTimeout(e.delayId), e.delayId = setTimeout(function () {
            d[b] ? e.render(d[b]) : c.get(e.url, {searchKey: encodeURIComponent(b)}, function (a) {
                d[b] = a, e.render(a)
            }, "JSON")
        }, e.delayTime)
    }, selectItem: function (a, b) {
        var c = r.find("li"), d = c.length;
        if (d) {
            var e = c.filter(".search_bg").index() || 0;
            a == "up" ? e -= 1 : a == "down" ? e += 1 : e = a, e < 0 && (e = d - 1), e >= d && (e = 0);
            var f = c.eq(e);
            c.removeClass("search_bg"), f.addClass("search_bg"), b || q.val(f.text())
        }
    }}, v = {changeField: function (a, b) {
        if (typeof a == "object")for (var c in a)this.changeField(c, a[c]); else s.find(a).val(b)
    }, changeType: function (a, b) {
        var d = c(a), e = d.attr("data-type");
        n.find("span").removeClass("cur"), d.addClass("cur");
        var f = {".filter": l[e - 1] || "", ".search_type": e};
        e == h ? (f[".search_frm"] = "searchsuggestion", q.attr("placeholder", q.attr("data-placeholder"))) : (f[".search_frm"] = "", q.attr("placeholder", "")), this.changeField(f), b && this.changeField(b)
    }, submit: function () {
        s[0].submit()
    }};
    return{init: function () {
        x()
    }}
});
fml.define("app/addFavorite", ["jquery", "app/logstatics", "app/tracking", "component/iStorage", "component/userstate"], function (a, b) {
    function h(a) {
        var b = a.href || "index.html", c = a.frm || "", d = a.name || "美丽说", e = a.tipPos || {}, g = a.notShowTip || !1;
        try {
            f.set("isAddFavorite", "1"), c && (c = b.indexOf("?") > -1 ? "&frm=" + c : "?frm=" + c), window.sidebar ? window.sidebar.addPanel(d, b + c, "") : document.all ? window.external.addFavorite(b + c, d) : g || i(e, a.obj)
        } catch (h) {
            g || i(e, a.obj)
        }
    }

    function i(a, b) {
        b = b || "#goTop";
        if (c(".favor_tip").length > 0)return;
        var d = "position:absolute; right:" + a.right + "px; top:" + a.top + "px;";
        a.center && (d = "margin:" + a.top + "px auto 0;");
        var e = '<div class="favor_tip none_f" style="' + d + 'border:1px solid #F3DB79; background-color:#FFC; width:200px; height:45px; text-align:center;">' + '<p style="height:22px; line-height:22px;">您的浏览器不支持自动加收藏</p>' + '<p style="height:22px; line-height:22px;">请按<span style="font-weight:bold;">ctrl+d</span>加入收藏</p>' + "</div>";
        c(b).append(e), c(".favor_tip").show(), setTimeout(function () {
            c(".favor_tip").remove()
        }, 5e3)
    }

    function j() {
        function a() {
            if (!g.isNew())return;
            if (c("#dialogLayer").find(".pop_login").length > 0)return;
            f.set("isAddFavorite", "1");
            var a = "亲，喜欢就收藏我们吧，每天都要来美丽说哟~~\n\n★每天分享20万件漂亮衣服，5万个新杂志\n★2000W爱美女生都在美丽说\n★24小时热榜，七天热榜持续更新\n★每周两次福利社更新，免费试用等你来拿";
            confirm(a) && (e.cr("add_favorite_before_leave"), h({frm: "hf", tipPos: {right: 40, top: 38}, notShowTip: !0}))
        }

        var b = window.onbeforeunload;
        window.onbeforeunload = function () {
            b && b(), f.get("isAddFavorite", function (b) {
                if (b === "1")return;
                a()
            })
        }
    }

    var c = a("jquery"), d = a("app/logstatics"), e = a("app/tracking"), f = a("component/iStorage"), g = a("component/userstate");
    b.addFavorite = h, b.addFavor = function () {
        var a = "/log_statistics/click_add_favorite";
        c(".collect").click(function () {
            h({href: location.href, frm: "shoucangjia", tipPos: {right: 40, top: 38}}), d.clicklog(a)
        })
    }
});
fml.define("app/adPoster", ["jquery", "component/windowScroll"], function (a, b) {
    function f(a, b) {
        var e = function () {
            return!1;
            var d, e, f
        };
        if (a === "bottom") {
            var f = !1;
            d.bind(function (a) {
                a > 120 && !f && (f = !0, setTimeout(function () {
                    d.unBind(arguments.callee)
                }, 10), e())
            })
        } else e()
    }

    function g() {
        var a = "http://www.meilishuo.com/tuan/tuanad_jsonp?callback=?";
        c.getJSON(a, function (a) {
            if (!a || a.length == 0)return;
            h(".ads_banner", a, {width: 2e3})
        })
    }

    function h(a, b, d) {
        if (!(b instanceof Array))return!1;
        var f = c(a).show(), g = b.length, h = c.extend({}, e, d);
        if (g === 0)return;
        f.html('<div class="boxImg"><ul class="_img"></ul></div><div class="_num"></div>');
        var j = f.find("._img"), k = f.find("._num");
        h.k = 0, h.len = g, i(j, k, b, h), m(a, h)
    }

    function i(a, b, c, d) {
        if (d.len === 1)a.append(j(c[0], d)); else {
            for (var e = 0; e < d.len; e++)a.append(j(c[e], d)), b.append('<a><span class="none_f">' + (e + 1) + "</span></a>");
            b.addClass("adType" + d.numType);
            switch (d.type) {
                case 1:
                    a.css({width: "100%", position: "absolute"}).find("li").css({"float": "left", display: "block", width: "100%"});
                    break;
                case 2:
                    a.css({width: d.width * d.len, display: "inline-block"});
                    break;
                case 3:
                    b.hide()
            }
        }
    }

    function j(a, b) {
        var c = '<li><div style="position:relative; height:' + b.height + "px; background:url(" + a.imgurl + ') center top no-repeat;">' + '<a target="_blank" href="' + a.linkurl + '" style="top:0;left:0;width:100%;height:' + b.height + "px;background-position:0 200px;position:absolute; _font-size:" + b.height + 'px;"></a></div></li>';
        return c
    }

    function k(a, b, c) {
        for (var d = 1; d < b; d++)(function (b) {
            setTimeout(function () {
                l(a.find("div").eq(b))
            }, c * b - 1e3)
        })(d)
    }

    function l(a) {
        var b = a.attr("p_url");
        if (!b)return;
        a.css("background", "url(" + b + ") top center no-repeat"), a.removeAttr("p_url")
    }

    function m(a, b) {
        var d = c(a);
        if (d.length == 0)return;
        var f = d.find("._img"), g = d.find("._num"), h = c.extend({}, e, b), i = h.k ? h.k : 0, j = h.len ? h.len : f.children().length;
        if (j === 1)return;
        h.type == 2 && f.css("width", h.width * (j + 1)), k(f, j, h.gap);
        var m = null, o = function (a) {
            function b(b, c) {
                if (a == j) {
                    var d = f.children().eq(0);
                    d.css("position", "relative").css(b, h[c] * a + "px"), setTimeout(function () {
                        f.css(b, 0), d.css({position: ""})
                    }, 400), a = 0
                }
            }

            function c(b) {
                if (a == 0) {
                    var c = f.children().eq(0);
                    f.css(b, 0), c.css({position: ""})
                }
            }

            f.stop(!0, !0), a == j && h.type == 3 && (a = 0);
            switch (h.type) {
                case 1:
                    f.animate({top: -h.height * a + "px"}, 300, function () {
                        c("top")
                    }), b("top", "height");
                    break;
                case 2:
                    f.animate({left: -h.width * a + "px"}, 300, function () {
                        c("left")
                    }), b("left", "width");
                    break;
                case 3:
                    g.hide(), f.children().fadeOut(), setTimeout(function () {
                        f.children().eq(a).fadeIn()
                    }, 400)
            }
            g.find(".current").removeClass("current"), g.children("a").eq(a).addClass("current")
        };
        h.left && c(h.left).click(function () {
            clearTimeout(m), i <= 0 && (i = j), o(--i), m = setTimeout(p, h.gap)
        }), h.right && c(h.right).click(function () {
            clearTimeout(m), i >= j && (i = 0), o(++i), m = setTimeout(p, h.gap)
        });
        var p = function () {
            i >= j && (i = 0), o(++i), m = setTimeout(p, h.gap)
        }, q = function () {
            var a = f.find("div");
            o(i), m = setTimeout(p, h.gap), g.find("a").hover(function () {
                clearTimeout(m), i = c(this).children("span").text() - 1, l(a.eq(i)), o(i)
            }, function () {
                m = setTimeout(p, h.gap)
            }), f.hover(function () {
                clearTimeout(m)
            }, function () {
                m = setTimeout(p, h.gap)
            })
        };
        if (h.type == 4) {
            n(d, h.speed);
            return
        }
        q()
    }

    function n(a, b) {
        var c = a.parent(), d = a.width(), e = -1, f = function () {
            var b = parseInt(a.css("margin-left"));
            b <= -d && (a.css("margin-left", 0), b = 0), a.css("margin-left", b + e + "px")
        }, g = setInterval(f, b);
        a.hover(function () {
            clearInterval(g)
        }, function () {
            g = setInterval(f, b)
        })
    }

    var c = a("jquery"), d = a("component/windowScroll"), e = {width: 2e3, height: 100, gap: 3e3, type: 1, numType: 1, speed: 50};
    b.adBanner = f, b.carousel = m, b.tuanBanner = g
});
fml.define("app/hoverNav", ["jquery", "component/windowScroll"], function (a, b) {
    var c = a("component/windowScroll");
    return function (a, b) {
        var a = $(a), d = $(b), e = null;
        if (!$(b)[0])return;
        var f = function () {
            i(), a.addClass("hover"), d.stop(!0, !0).show(), c.bind(h, "hideList")
        }, g = function () {
            a.removeClass("hover"), d.stop(!0, !0).hide(), c.unBind("hideList")
        }, h = function () {
            e = setTimeout(g, 200)
        }, i = function () {
            e && (clearTimeout(e), e = null)
        };
        a.hover(f, h), d.hover(i, h)
    }
});
fml.define("app/sharePost", ["app/dialogSuccess", "app/twitterApi", "ui/alert", "component/regString", "app/newMagazine", "app/magazine", "component/shareTmp", "jquery", "app/smile", "app/checkLogin", "app/checkStatusCode", "ui/dialog"], function (a, b) {
    var c = a("jquery"), d = a("ui/dialog"), e = a("component/shareTmp"), f = a("app/magazine"), g = a("component/regString"), h = a("app/checkLogin"), i = a("app/dialogSuccess"), j = a("app/smile"), k = a("app/checkStatusCode"), l = a("app/newMagazine"), m = a("app/twitterApi").twitterApi, n = a("ui/alert"), o = function (a) {
        c("#shareMeiliDialog , #reportShowShare").bind("click", function () {
            if (!h())return;
            b(), j(), r(), l.newMeiliMagazine(".new_magazine")
        });
        var b = function () {
            var a = e("addShareTpl"), b = c(a).show();
            new d({title: "分享", content: b})
        }, j = function () {
            c(".share_goods").bind("click", function () {
                var a = e("shareGoodsLinkTpl"), b = a;
                new d({title: "分享宝贝", content: b, isOverflow: !1, onStart: function () {
                    c(".smileysbox").hide()
                }, onClose: function () {
                    c(".smileysbox").hide()
                }}), c("#addGoodsSubmit").bind("click", function () {
                    var a = c(".add_goods_url").val();
                    o.goodsAjax(a)
                })
            })
        }, k = function (a, b) {
            b = b || function () {
            }, new n({content: a, width: 370, onClose: b})
        }, p = !0;
        o.goodsAjax = function (a, b, d) {
            typeof b == "function" && (d = b, b = null);
            var e = {url: encodeURIComponent(a)}, f = function (e) {
                c("#linkMessageTips").html("");
                if (!e) {
                    k("服务过于繁忙，亲，请稍候重试~~"), p = !0;
                    return
                }
                if (e.code) {
                    var f = b && b.pickup == 3 ? d : null;
                    k(e.msg, f)
                } else if (e.data && e.data.gInfo) {
                    if (!d || b && b.pickup == 3)d = q;
                    d(e, a, b)
                }
                p = !0
            };
            if (p) {
                a.substring(0, 4) != "http" && (a = "http://" + a);
                if (g.isUrl(a))c("#linkMessageTips").html('<span class="red_f">正在获取宝贝信息</span>'), m("fetch", e, f, function (a) {
                    p = !0, k("系统暂时无法响应，请稍后再试")
                }), p = !1; else {
                    var h = c.trim(a).length === 7 ? "亲，要输入宝贝地址的哦~" : "无法获取宝贝信息，请检查链接是否正确，重新尝试。";
                    c("#linkMessageTips").html('<span class="red_f">' + h + "</span>")
                }
            }
        };
        var q = function (a, b, d) {
            d || (d = {pickup: 1}), f();
            var e = a.data.gInfo.image, h = a.data.gInfo.goodsID, j = a.data.gInfo.title;
            c(".shareLinks").hide(), c(".magaImgage").attr("src", e), c(".magaImgage").attr("title", j), c(".goods_title").show().html(j);
            var l = !0;
            c("#forwardContent").focus(function () {
                c(".show_message_tips").hide()
            }), c("#forwardMaga").unbind("click").bind("click", function () {
                if (!g.WidthCheck(c("#forwardContent").val(), 140))return c(".show_message_tips").html("您输入的字数超过140字").show(), !1;
                c(".show_message_tips").html("正在提交...").show();
                var a = c(".selectText").attr("val"), b = c(".selectList").attr("val") || c(".selectList").val();
                if (a == "undefined" && !b)return c(".show_message_tips").html("杂志不能为空哦~请先创建杂志").show(), !1;
                var f = "";
                c("#forwardContent").val() != "写点什么,评论一下" && (f = c("#forwardContent").val());
                var n = {type: 7, goodsID: h, group_id: a, name: b, tContent: f, goods_pic_url: e, goods_title: j, syncToQzone: c(this).parents(".maga_zf").find("[s_name=qzone]").attr("s_type") == 1 ? "true" : "false", syncToWeibo: c(this).parents(".maga_zf").find("[s_name=weibo]").attr("s_type") == 1 ? "true" : "false"};
                d && d.pickup == 3 && (n.source = "pickup");
                var o = function (b) {
                    l = !0;
                    if (!b)return c(".show_message_tips").html("系统暂时无法响应，请稍后再试").show(), !1;
                    if (b.code && b.msg)return k(b.msg), !1;
                    i.shareSuccess(c(".selectText").text(), a, "分享成功", d.pickup)
                };
                l && (m("create", n, o), l = !1)
            })
        }, r = o.sharMeiliPic = function () {
            c(".share_pic").unbind("click").bind("click", function () {
                var a = e("shareGoodsUploadTpl"), b = c(a).show();
                new d({title: "上传照片", content: b, onStart: function () {
                    c(".smileysbox").hide()
                }, onClose: function () {
                    c(".smileysbox").hide()
                }}), c("#uploadFileSubmit").css({opacity: "0", position: "absolute", left: "-18px", height: "40px", "-moz-transform": "scale(2)", top: "60px"}), c("#uploadFileSubmit").bind("change", function () {
                    var a = c("#uploadFileSubmit").val();
                    if (!/\.(gif|jpg|png|jpeg|bmp)$/i.test(a))return k("请上传标准图片文件, 我们支持gif,jpg,png和jpeg."), !1;
                    c(".up_photos").hide(), c(".up_photosing").show(), this.form.submit()
                });
                var g = document.getElementById("getUploadFile"), h = function () {
                    if (this.readyState && this.readyState != "complete")return;
                    c(".up_photos").show(), c(".up_photosing").hide();
                    var a = g.contentDocument || g.contentWindow.document, b = a.body.innerHTML.replace(/<.*?>/g, "").replace("&amp;", "&");
                    if (!b)return;
                    b = c.parseJSON(b);
                    if (b.code)return k(b.msg), c("#uploadFileSubmit").val(""), c("#submitPicture")[0].reset(), !1;
                    f(), c(".magaImgage").attr("src", b.pic_url), c(".magaImgage").attr("id", b.pic_id), o.picForUpload({data: b})
                };
                g.attachEvent ? g.attachEvent("onload", h) : g.onload = h
            })
        };
        o.picForUpload = function (a) {
            var b = a.source, d = !0;
            c("#forwardContent").focus(function () {
                c(".show_message_tips").hide()
            }), c("#forwardMaga").unbind("click").bind("click", function () {
                if (!g.WidthCheck(c("#forwardContent").val(), 140))return c(".show_message_tips").html("您输入的字数超过140字").show(), !1;
                c(".show_message_tips").html("正在提交...").show();
                var e = "";
                c("#forwardContent").val() != "写点什么,评论一下" && (e = c("#forwardContent").val());
                var f = c(".selectText").attr("val"), h = c(".selectList").attr("val") || c(".selectList").val();
                if (f == "undefined" && !h)return c(".show_message_tips").html("杂志不能为空哦~请先创建杂志").show(), !1;
                var j = {group_id: f, tContent: e, type: 5, source: a.source, name: h, syncToQzone: c(this).parents(".maga_zf").find("[s_name=qzone]").attr("s_type") == 1 ? "true" : "false", syncToWeibo: c(this).parents(".maga_zf").find("[s_name=weibo]").attr("s_type") == 1 ? "true" : "false"};
                a.data.pic_id && (j.type = 2, j.pid = a.data.pic_id);
                var l = function (a) {
                    d = !0, c(".up_photos").show(), c(".up_photosing").hide();
                    if (!a)return c(".show_message_tips").html("系统暂时无法响应，请稍后再试").show(), !1;
                    if (a.code && a.msg)return k(a.msg), c(".show_message_tips").hide(), !1;
                    i.shareSuccess(c(".selectText").text(), f, "上传成功", b), c(".show_message_tips").hide()
                };
                c(".up_photos").hide(), c(".up_photosing").show(), d && (m("create", j, l), d = !1)
            })
        }
    };
    b.dialogShow = o
});
fml.define("component/focus", ["jquery"], function (a, b) {
    var c = a("jquery"), d = document.createElement("input"), e = "placeholder"in d;
    d = null;
    var f = e ? function (a, b) {
        var d = c(a), e = b ? c(b).find(a).attr("placeholder") : d.attr("placeholder");
        b ? c(b).on("focus", a, function () {
            c(this).attr("placeholder", "")
        }).on("blur", a, function () {
            c(this).attr("placeholder", e)
        }) : d.bind("focus", function () {
            d.attr("placeholder", "")
        }).bind("blur", function () {
            d.attr("placeholder", e)
        })
    } : function (a, b) {
        var d = b ? c(b).find(a) : c(a), e = d.attr("placeholder");
        "" == d.val() && d.val(e), b ? c(b).on("focus", a, function () {
            this.value == e && (this.value = "")
        }).on("blur", a, function () {
            this.value == "" && (this.value = e)
        }) : d.bind("focus", function () {
            this.value == e && (this.value = "")
        }).bind("blur", function () {
            this.value == "" && (this.value = e)
        })
    };
    b.inputFocus = f
});
fml.define("app/checkLogin", ["jquery", "app/login", "ui/alert"], function (a, b) {
    var c = a("jquery"), d = a("app/login");
    return function (b) {
        var c = b || {};
        if (Meilishuo.config.user_id == 0)return Meilishuo.config.login_state === 0 ? !1 : (d.showLoginWin(c), !1);
        if (Meilishuo.config.is_actived == "taobao")return window.location.href = "/settings/personalUpdate", !1;
        if (Meilishuo.config.is_actived == 6)return window.location.href = "/settings/emailSend", !1;
        if (Meilishuo.config.is_actived == 2)return window.location.href = Meilishuo.config.server_url + "user/register/success", !1;
        if (!Meilishuo.config.forSale && Meilishuo.config.level == 5) {
            var e = a("ui/alert"), f = Meilishuo.config.block_remain, g = f > 0 ? "处理，" + f + "天后自动解禁" : "处理", h = '<p class="l20_f"><span style="margin-left: 24px;">您发的内容包含违规信息（涉及垃圾广告、政治、色情、病毒等内容），违反了<a class="red_f" target="_blank" href="/aboutus/direct">美丽说社区指导原则</a>，故对您的账号进行禁言' + g + '。为了您和其他用户更好的使用美丽说，请不要继续发布违规信息。谢谢您的配合！如有任何问题，欢迎<a class="red_f" target="_blank" href="/help/feedback?feedTag=2">反馈给我们</a>。</span></p>', i = new e({width: 400, content: h, isOverflow: !1, discover: !0, title: "禁言提示"});
            return!1
        }
        return!0
    }
});
fml.define("component/windowScroll", [], function (a, b) {
    function m(a) {
        if (a == window)return 0;
        var b = a.getAttribute("id") || a.getAttribute("uuid");
        return b || (b = ++d, a.setAttribute("uuid", b)), b
    }

    function n(a) {
        return a ? a.scrollTop : g.scrollTop || h.scrollTop
    }

    function o(a, b) {
        var d = b || window;
        if (c.hasOwnProperty(a))return;
        c[a] = !0, d.onscroll = function () {
            var c = n(b);
            f = c - e > 0, e = c, q(a), 0 === a && p(f)
        }
    }

    function p(a) {
        var b, c, d;
        a ? (b = i, c = j, d = "gteFn") : (b = j, c = i, d = "ltFn");
        var f = b.length;
        for (var g = f - 1; g >= 0; g--) {
            var h = b[g];
            if (!h)continue;
            var k = h.y;
            h.dynamicY && (k = k()), !a ^ k <= e && (b.splice(g, 1), c.push(h), "function" == typeof h[d] && h[d](e))
        }
    }

    function q(a) {
        if (!k.hasOwnProperty(a))return;
        var b = k[a];
        for (var c in b)b[c](e, f)
    }

    var c = {}, d = 0, e = 0, f, g = document.documentElement || document.body, h = document.body || document.documentElement, i = [], j = [], k = {}, l = 0;
    b.property = function (b, c) {
        switch (b) {
            case"height":
                return c ? c.offsetHeight : g.clientHeight;
            case"scrollTop":
                return n(c)
        }
    }, b.unBind = function (a, b) {
        var c = m(b || window), d = k[c];
        if ("string" == typeof a) {
            var e = a;
            d && undefined != d[e] && delete d[e]
        } else for (var e in d)if (a == d[e]) {
            delete d[e];
            break
        }
    }, b.bind = function (a, b, d) {
        var e = m(d || window);
        c.hasOwnProperty(e) || o(e, d), k[e] = k[e] || {};
        var f = k[e];
        b ? f[b] = a : f[l++] = a
    }, b.yIn = function (a, b, d) {
        c.hasOwnProperty(0) || o(0);
        var f = {y: a, gteFn: b, ltFn: d, dynamicY: "function" == typeof a};
        e = n(), a > e ? i.push(f) : (j.push(f), b && b(e))
    }
});
fml.define("component/iframeShim", ["jquery"], function (a, b) {
    function d(a) {
        this.target = c(a).length == 0 ? c(document.getElementById(a)) : c(a).eq(0), this.iframe = e(), this.iframe.appendTo(document.body)
    }

    function e() {
        return c("<iframe>", {frameborder: 0, src: "javascript:void(0)", "class": "iframeShim", css: {display: "none", border: "none", opacity: 0, position: "absolute"}})
    }

    var c = a("jquery");
    d.prototype.sync = function () {
        var a = this.target, b = this.iframe, c = a.outerHeight(), d = a.outerWidth(), e = a.offset().top, f = a.offset().left, g = parseInt(a.css("zIndex")) - 1 || 0;
        !c || !d || a.is(":hidden") ? b.hide() : (b.css({width: d, height: c, zIndex: g, top: e, left: f}), b.show())
    }, d.prototype.destroy = function () {
        this.iframe && (c(".iframeShim").remove(), delete this.iframe, delete this.target)
    };
    if (c.browser.msie && c.browser.version == 6)return d;
    function f() {
    }

    return f.prototype.sync = f, f.prototype.destroy = f, f
});
fml.define("component/window", ["jquery", "component/position", "component/windowScroll"], function (a, b) {
    function g(a) {
        var b = {width: 520, height: "auto", windowId: "dialogLayer", titleId: "dialogTitle", contentId: "dialogContent", title: "提示", content: "", isEffect: !1, hasTitle: !0, hasClose: !0, ifrUrl: "", ifrId: ""};
        this.opts = c.extend({}, b, a)
    }

    function h() {
        return c("<div>", {id: this.opts.windowId, "class": this.opts.windowId, css: {width: this.opts.width, height: this.opts.height}})
    }

    function i() {
        return c("<div>", {id: this.opts.windowId, "class": this.opts.windowId, css: {background: "none"}}).append(this.opts.content)
    }

    function j() {
        return c("<div>", {id: this.opts.titleId, "class": this.opts.titleId}).append('<span class="close_z" id="closeDialog"></span><span id="dialogTitleText">' + this.opts.title + "</span>")
    }

    function k() {
        return c("<div>", {id: this.opts.titleId, "class": this.opts.titleId}).append('</span><span id="dialogTitleText">' + this.opts.title + "</span>")
    }

    function l() {
        return c("<div>", {id: this.opts.titleId, "class": this.opts.titleId}).append('<span class="close_z" id="closeDialog"></span>')
    }

    function m() {
        return c("<div>", {id: this.opts.contentId, "class": this.opts.contentId}).append(this.opts.content)
    }

    var c = a("jquery"), d = a("component/position"), e = a("component/windowScroll"), f = c.browser.msie || c.browser.version == "6.0";
    return g.prototype.sync = function () {
        this.opts.notFrame ? this.window = i.call(this) : (this.window = h.call(this), this.opts.hasTitle && (this.opts.hasClose ? this.title = j.call(this) : this.title = k.call(this), this.title.appendTo(this.window)), this.content = m.call(this), this.content.appendTo(this.window));
        if (this.opts.ifrUrl) {
            var a = 37, b = this.opts.height > a ? "height = '" + (this.opts.height - a) + "'" : "";
            c("<iframe id='" + this.opts.ifrId + "' src='" + this.opts.ifrUrl + "' frameborder='0' " + b + " width='100%'></iframe>").appendTo(this.content)
        }
        c('<div class="clear_f"></div>').appendTo(this.content), this.window.hide().appendTo(document.body), this.toCenter(), this.opts.isEffect ? this.window.fadeIn(500) : this.window.show()
    }, g.prototype.destroy = function () {
        this.window && (this.opts.isEffect ? this.window.fadeOut(500, c.proxy(function () {
            this.window.remove(), delete this.window
        }, this)) : (this.window.remove(), delete this.window))
    }, g.prototype.toCenter = function () {
        this.window.css("position") == "fixed" ? d.winCenter(this.window, window) : this.opts.isOverflow ? (d.docCenter(this.window, window), c(window).bind("scroll", c.proxy(function () {
            d.docCenter(this.window, window)
        }, this))) : d.winCenter(this.window, window)
    }, g.prototype.onClose = function (a) {
        c("." + this.opts.titleId).on("click", "#closeDialog", function () {
            a()
        })
    }, g
});
fml.define("component/overlay", ["jquery", "component/iframeShim"], function (a, b) {
    function f(a) {
        a = a || {}, this.id = a.id || "overlay", this.className = a.className || "transmaskLayer", this.transparent = a.transparent || !1, this.isOverflow = a.isOverflow, this.isEffect = a.isEffect || !1
    }

    function g() {
        $document = c(document);
        var a = $document.height(), b = $document.width();
        return c("<div>", {css: {width: b, height: a}})
    }

    var c = a("jquery"), d = a("component/iframeShim"), e = c.browser.msie;
    return f.prototype.sync = function () {
        this.overlay = g(), this.overlay.attr("id", this.id), this.overlay.get(0).className = this.transparent ? this.className : "maskLayer", this.overlay.hide().appendTo(document.body), this.iframe = new d(this.id), this.iframe.sync(), this.isOverflow || this.overflow(), this.isEffect ? this.overlay.fadeIn(500) : this.overlay.show()
    }, f.prototype.destroy = function () {
        this.overlay && (this.isEffect ? this.overlay.fadeOut(500, c.proxy(function () {
            this.overlay.remove(), delete this.overlay
        }, this)) : (this.overlay.remove(), delete this.overlay)), this.iframe && this.iframe.destroy(), !this.isOverflow && arguments[0] && (c("body").css("overflow", "auto"), e && c("html").css({overflow: "auto", "overflow-x": "hidden"}))
    }, f.prototype.overflow = function () {
        c(document.body).css("overflow", "hidden"), e && c("html").css("overflow", "visible"), this.overlay.width("100%")
    }, f
});
fml.define("component/position", ["jquery"], function (a, b) {
    var c = a("jquery"), d = c(document), e = c(window);
    return Array.prototype.indexOf || (Array.prototype.indexOf = function (a) {
        var b = this;
        for (var c = 0; c < b.length; c++)if (b[c] == a)return c;
        return-1
    }), {pin: function (a, b) {
        var c = this.placePx(a.css("marginTop")), d = this.placePx(a.css("marginLeft")), e = this.placePx(a.css("borderTopWidth")) + this.placePx(a.css("borderBottomWidth")), f = this.placePx(a.css("borderLeftWidth")) + this.placePx(a.css("borderRightWidth")), g = a.offset().top, h = a.offset().left;
        return{left: h + d + f, top: g + c + e}
    }, placePx: function (a) {
        return+a.replace("px", "")
    }, winCenter: function (a, b) {
        a = a instanceof c ? a : c(a), b = b instanceof c ? b : c(b);
        var d = "50%", e = -a.width() / 2;
        if (a.css("position") == "fixed")var f = (b.height() - a.height()) / 4; else var f = c(document).scrollTop() + (b.height() - a.height()) / 4;
        a.css({top: f, left: d, "margin-left": e})
    }, docCenter: function (a, b) {
        a = a instanceof c ? a : c(a), b = b instanceof c ? b : c(b);
        var d = c(document).scrollLeft() + (b.width() - a.width()) / 2, e = c(document).scrollTop() + (b.height() - a.height()) / 3;
        a.css({top: e, left: d})
    }, toFixed: function (a, b) {
        a = a instanceof c ? a : c(a);
        var d = c(document).scrollTop() + b.top;
        a.css({top: d, left: b.left})
    }, depend: function (a, b, f) {
        a = a instanceof c ? a : c(a), b = b instanceof c ? b : c(b), f = f || [];
        var g, h, i = a.width(), j = a.height(), k = b.width(), l = b.height(), m = b.offset().left, n = b.offset().top, o = e.height(), p = d.scrollTop(), q = e.width();
        f.indexOf("bottom") != -1 ? (h = n + l, g = m - i / 2 + k / 2) : f.indexOf("right") != -1 ? (h = n - j / 2 + l / 2, g = m + k + c(".left_ico").height(), c(".left_ico").css({top: (j - c(".left_ico").height()) / 2}).show()) : f.indexOf("top") != -1 ? (h = n - j, g = m - i / 2 + k) : (h = n - j / 2 + l / 2, g = m - i), a.css({top: h, left: g})
    }}
});
fml.define("component/windowDrive", ["component/position", "component/overlay", "component/window", "jquery"], function (a, b) {
    function g(a) {
        return this.opts = a || {}, this.overlay = new e(this.opts), this.window = new f(this.opts), c(document.activeElement).blur(), this
    }

    var c = a("jquery"), d = a("component/position"), e = a("component/overlay"), f = a("component/window");
    return fml.vars.saveItem = 0, g.prototype.createOverlay = function () {
        this.overlay.sync()
    }, g.prototype.createWindow = function () {
        fml.vars.saveItem++, this.opts.onStart && this.opts.onStart(), this.window.sync(), this.opts.onChange && this.opts.onChange(), this.window.onClose(c.proxy(function () {
            this.destroyModel()
        }, this));
        if (!this.opts.notKeyClose) {
            c("body").one("keydown.uiAlert", c.proxy(function (a) {
                return a.keyCode == 27 && this.destroyModel(), !1
            }, this));
            var a = c._data(document.getElementsByTagName("body")[0], "events");
            if (a && a.keydown) {
                var b = a.keydown.pop();
                a.keydown.splice(0, 0, b)
            }
        }
    }, g.prototype.destroyModel = function (a) {
        fml.vars.saveItem--, !a && this.opts.onClose && this.opts.onClose(), fml.vars.saveItem <= 0 && (fml.vars.saveItem = 0), this.overlay.destroy(fml.vars.saveItem == 0), this.window.destroy(), c("body").unbind("keydown.uiAlert")
    }, g
});
fml.define("core/sjt", [], function (a, b) {
    var c = {};
    return function d(a, b) {
        var e = /\W/.test(a) ? new Function("obj", "var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('" + a.replace(/[\r\t\n]/g, " ").split("<?").join("	").replace(/((^|\?>)[^\t]*)'/g, "$1\r").replace(/\t=(.*?)\?>/g, "',$1,'").split("	").join("');").split("?>").join("p.push('").split("\r").join("\\'") + "');}return p.join('');") : c[a] = c[a] || d(document.getElementById(a).innerHTML);
        return b ? e(b) : e
    }
});
fml.define("app/checkPic", [], function (a, b) {
    function f(a) {
        var b = a.data("id"), d = ++c[b], e = d * 90;
        a.css({"-ms-transform": "rotate(" + e + "deg)", "-webkit-transform": "rotate(" + e + "deg)", "-o-transform": "rotate(" + e + "deg)", "-moz-transform": "rotate(" + e + "deg)", transform: "rotate(" + e + "deg)", filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=" + e % 360 / 90 + ")"})
    }

    var c = [0, 0, 0, 0], d = function (a) {
        e();
        var b;
        $(".authpic .change_pic").click(function () {
            $(".authpic .errorMessage").html("");
            if (b)return;
            e(), b = 1, setTimeout(function () {
                b = 0
            }, 500)
        }), $(".authpic").on("click", "img", function () {
            f($(this))
        })
    }, e = function () {
        c = [0, 0, 0, 0], $.ajax({url: "aj/check_code_aj/pic_code/rotate_pic", type: "GET", dataType: "json", data: {code_type: "c4"}, success: function (a) {
            var b = $(".pic_list");
            if (a.code == 0) {
                var c = a.data.captcha_urls, d = "";
                for (i = 0; i < c.length; i++)b.find("li").eq(i).html('<img src="' + c[i] + '"alt="" data-id="' + i + '">')
            } else alert(a.message)
        }, error: function () {
            alert("系统繁忙，请稍后再试")
        }})
    }, c = function () {
        return c
    };
    b.initPic = d, b.changePic = e, b.clickNum = c
});
fml.define("component/iStorage", [], function (a, b) {
    var c = !1, d = !1, e = {cookieArr: {}, options: {domain: ".meilishuo.com", path: "/"}, setCookie: function (a, b, c) {
        c = c || {};
        var d = a + "=" + encodeURIComponent(b);
        c.domain || (c.domain = this.options.domain), c.path || (c.path = this.options.path), d += "; domain=" + c.domain, c.path && (d += "; path=" + c.path);
        if (c.duration) {
            var e = new Date;
            e.setTime(e.getTime() + c.duration * 1e3), d += "; expires=" + e.toGMTString()
        }
        return c.secure && (d += "; secure"), document.cookie = d + ";"
    }, getCookie: function (a, b) {
        this.cookieArr[a] = this.cookieArr[a] || function () {
            typeof a != "string" && (a = a.toString());
            var b = window.document.cookie.match("(?:^|;)\\s*" + a.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1") + "=([^;]*)");
            return b ? decodeURIComponent(b[1]) : undefined
        }();
        var c = this.cookieArr[a];
        return b ? b(c) : c
    }, removeCookie: function (a) {
        return this.setCookie(a, "", {duration: -1})
    }}, f = {set: function (a, b, c, d) {
        c ? sessionStorage.setItem(a, b) : localStorage.setItem(a, b), typeof d == "function" && d()
    }, get: function (a, b, c) {
        try {
            b ? c(sessionStorage.getItem(a)) : c(localStorage.getItem(a))
        } catch (d) {
        }
    }, remove: function (a, b) {
        b ? sessionStorage.removeItem(a) : localStorage.removeItem(a)
    }}, g = {flash: document.getElementById("storage"), sessionId: "", callback: [], init: function (a) {
        a && (this.sessionId = this.sessionId || e.getCookie("PHPSESSID"));
        if (c || d)return;
        d = !0;
        var b = new Date, f = document.createElement("div"), g = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="storage"';
        g += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1" height="1">', g += '<param name="movie" value="http://i.meilishuo.net/css/images/window/storage1.swf" />', g += '<param name="quality" value="high" />', g += '<param name="allowScriptAccess" value="always" />', g += "</object>", f.innerHTML = g, document.body.appendChild(f), this.flash = document.getElementById("storage")
    }, detectIE: function () {
        var a = navigator.userAgent.toLowerCase();
        if (window.ActiveXObject) {
            var b = a.match(/msie ([\d.]+)/)[1];
            if (b >= 5.5 && b < 8)return!0
        }
        return!1
    }, set: function (a, b, d, e) {
        function g(a, b, c) {
            if (c) {
                var d = new Date;
                d = parseInt(d.getTime() / 36e5), f.flash.setSessionTime(d), f.flash.setSessionVal(f.sessionId + a, d), f.flash.set(f.sessionId + a, b)
            } else f.flash.set(a, b)
        }

        var f = this;
        f.init(d), c ? (g(a, b, d), typeof e == "function" && e()) : f.callback.push(function () {
            g(a, b, d), typeof e == "function" && e()
        })
    }, get: function (a, b, d) {
        function f(a, b) {
            return b ? (e.flash.removeAllSession(), e.flash.get(e.sessionId + a)) : e.flash.get(a)
        }

        var e = this;
        e.init(b), c ? d(f(a, b)) : e.callback.push(function () {
            d(f(a, b))
        })
    }, remove: function (a, b) {
        var d = this;
        d.init(b);
        if (!c) {
            var d = this;
            window.setTimeout(function () {
                d.remove(a, b)
            }, 100);
            return
        }
        b ? d.flash.remove(d.sessionId + a) : d.flash.remove(a)
    }}, h = {set: function (a, b, c, d) {
        c ? e.setCookie(a, b) : e.setCookie(a, b, {duration: 15552e3}), typeof d == "function" && d()
    }, get: function (a, b, c) {
        c(e.getCookie(a))
    }, remove: function (a, b) {
        e.removeCookie(a)
    }}, i = g.detectIE() ? function () {
        try {
            var a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            return a ? g : h
        } catch (b) {
            return h
        }
    }() : f;
    return{isJSReady: function () {
        return!0
    }, getAllowDomain: function () {
        var a = a || ["www.meilishuo.com", "newlab.meilishuo.com", "newtest.meilishuo.com", "wwwtest.meilishuo.com", "cdjdev.meilishuo.com", "xhdev.meilishuo.com", "rwdev.meilishuo.com", "nanodev.meilishuo.com"];
        return a
    }, flashReadyHandler: function () {
        c = !0;
        for (var a = 0, b = g.callback.length; a < b; a++)g.callback[a]()
    }, setCookie: function (a, b, c) {
        return e.setCookie(a, b, c)
    }, getCookie: function (a, b) {
        return e.getCookie(a, b)
    }, removeCookie: function (a) {
        return e.removeCookie(a)
    }, setSession: function (a, b, c) {
        return i.set(a, b, !0, c)
    }, getSession: function (a, b) {
        return i.get(a, !0, b)
    }, removeSession: function (a) {
        return i.remove(a, !0)
    }, set: function (a, b, c) {
        return i.set(a, b, !1, c)
    }, get: function (a, b) {
        return i.get(a, !1, b)
    }, remove: function (a) {
        return i.remove(a, !1)
    }}
});
fml.define("app/tracking", ["jquery", "component/iStorage"], function (a, b) {
    function j(a) {
        var b = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ", c = "", d = a;
        while (d--)c += b.substr(Math.floor(Math.random() * 62), 1);
        return c
    }

    function k() {
        return g = j(10) + "-" + ((new Date).getTime() - (new Date(2012, 6, 1)).getTime()), m(), g
    }

    function l(a) {
        var b = [];
        for (var c in a)b.push(c + "=" + encodeURIComponent(a[c]));
        return b.join("&")
    }

    function m() {
        var a = "unknown";
        Meilishuo && Meilishuo.config && (a = Meilishuo.config.user_id), q("device", {refer: document.referrer, userid: a, w_w: window.screen.width, w_h: window.screen.height})
    }

    function n(a) {
        var b = window.onbeforeunload;
        window.onbeforeunload = function (c) {
            a(), b && b()
        }
    }

    function o() {
    }

//    function p() {
//        var a = document.documentElement || document.body, b = window.name;
//        b || (b = window.name = j(6)), q("pv/in", {refer: document.referrer, url: window.location.href, win: b, userid: Meilishuo.config.user_id, b_w: a.clientWidth, b_h: a.clientHeight}), n(function () {
//            q("pv/out", {pgout: (new Date).getTime()})
//        })
//    }

    function q(a, b) {
        if (!g) {
            if (f--)return window.setTimeout(function () {
                q(a, b)
            }, 25);
            g = "unknown"
        }
        a = a ? a + "/" : "", a += "?";
        var c = 2e3, d, j;
        i++, j = l({device_id: g, pgid: h, seqid: i});
        for (var k in b) {
            var m = b[k];
            if (!m)continue;
            "function" == typeof m ? m = m() : "object" == typeof m && m.length ? m = m.join("+") : m && (m = encodeURIComponent(m));
            if (undefined === m)continue;
            b[k] = m, j += "&" + k + "=" + m
        }
        var n = new Image;
        n.src = e + a + j
    }

//    var c = a("jquery"), d = a("component/iStorage"), e = "//sense.meilishuo.com/", f = 10, g, h = (new Date).getTime(), i = 0;
//    "newlab.meilishuo.com" == window.location.host && (e = "//senselab.meilishuo.com/"), d.get("device", function (a) {
//        "undefined" == a && (a = null), g = a || d.set("device", k())
//    }), b.logIt = function (a, b) {
//        q(a, b || {})
//    }, b.cr = function (a, b) {
//        q("cr/" + a, b || {})
//    }, b.logClick = function (a, b, d) {
//        function f() {
//            q(d, {click: e}), e = []
//        }
//
//        function g(c) {
//            c = c || window.event;
//            var d = [c.pageX, c.pageY];
//            d.push((a ? this : c.target).getAttribute(b || "frm") || ""), e.push(d.join(",")), delete d, (e.length > 5 || a) && f()
//        }
//
//        var e = [], d = d || "click";
//        return a ? c(document).on("click", a, g) : (c(document).click(g), n(f)), this
//    }, b.logPoster = function () {
//        function a(a) {
//            if (!a || !a.tInfo)return;
//            var b = [];
//            try {
//                for (var c = 0, d = a.tInfo.length; c < d; c++)b.push(a.tInfo[c].twitter_id);
//                q("poster", {site_userid: Meilishuo.config.user_id, site_refer: window.location.pathname, site_tid: b})
//            } catch (e) {
//            }
//        }
//
//        return fml.eventProxy("logPoster", a), this
//    }, p()
});
fml.define("app/checkcode", [], function (a, b) {
    return function (a, b, c) {
        var d = (Meilishuo.config.captcha_url || "http://captcha.meilishuo.com/") + "Register/Captcha?token=asde39ad9" + "&session=" + Math.random();
        if (b) {
            var c = c || "e.meilishuo.com";
            d = "https://" + c + "/home/Captcha?_r=" + Math.random()
        }
        $(".checkImage").find("img").attr("src", d), a && a()
    }
});
fml.define("app/closeFrame", [], function (a, b) {
    return function () {
        if (!document.referrer)return;
        var a = window.postMessage;
        if (!a)window.name = "close", window.location = document.referrer; else {
            var b = window.name;
            b && b.indexOf("http://") == -1 && (b = null), parent.postMessage("close", b || document.referrer)
        }
    }
});
fml.define("ui/dialog", ["component/windowDrive", "jquery"], function (a, b) {
    function f(a) {
        return this.opts = a || {}, this.drive = new d(this.opts), this.sync(), this
    }

    var c = a("jquery"), d = a("component/windowDrive"), e = [];
    return f.prototype.sync = function () {
        if (!this.opts.isDestory && e.length) {
            for (var a = e.length; a--;)e[a].drive.destroyModel(!0);
            e.length = 0
        }
        return e.push(this), this.drive.createOverlay(), this.drive.createWindow(), this
    }, f.prototype.destory = function () {
        this.drive.destroyModel()
    }, f
});
fml.define("component/shareTmp", ["core/sjt"], function (a, b) {
    var c = a("core/sjt");
    return function (a, b) {
        if (!document.getElementById(a)) {
            fml.debug(a + " is lost");
            return
        }
        b = b || Object;
        try {
            var d = c(a, b)
        } catch (e) {
            fml.debug(e)
        }
        return d
    }
});
fml.define("component/validate", [], function (a, b) {
    return{validate: function (a, b, c, d) {
        function w(a, b) {
            if (typeof a != "object")return;
            var c = {};
            for (var d in a)if (!l[d]) {
                l[d] = [];
                var e = a[d];
                for (var g in e) {
                    var h = g.split("=");
                    l[d][h[0]] = [f[h[0]], h[1], e[g]]
                }
                c[d] = l[d]
            }
            b || C(c)
        }

        function x(a) {
            if (!d.success)return;
            var b = d.success.split("="), c = a.parentNode.getElementsByTagName(b[0])[0];
            c && (c.className = b[1])
        }

        function y(a) {
            if (!d.error)return;
            var b = d.error.split("="), c = a.parentNode.getElementsByTagName(b[0])[0];
            c && (c.className = b[1])
        }

        function z() {
            for (var a in l) {
                var b = k[a];
                A(b)
            }
        }

        function A(a) {
            var b = document.getElementById("msg" + a.name);
            b && b.parentNode.removeChild(b);
            if (d.success) {
                var c = d.success.split("=");
                a.parentNode.getElementsByTagName(c[0])[0].className = ""
            }
            if (d.error) {
                var e = d.error.split("=");
                a.parentNode.getElementsByTagName(e[0])[0].className = ""
            }
        }

        function B(a, b, c) {
            h && (c = h);
            var e = a[b.name];
            for (var f in e) {
                var g = document.getElementById("msg" + b.name);
                g && g.parentNode.removeChild(g);
                if (f == "indexOf")continue;
                if (!e[f][0](b, e[f][1]))return G(b, e[f][2], c), !1
            }
            return d.isExist && d.isExist[b.name] ? Y(b, c, d.isExist[b.name]) : x(b), !0
        }

        function C(a, b, c) {
            for (var d in a) {
                var e = k[d];
                e.onblur = function () {
                    B(a, this, b)
                }, e.type === "checkbox" && (e.onclick = function () {
                    B(a, this, b)
                })
            }
            typeof c == "function" && c()
        }

        function D(a, b) {
            E(e);
            var c = b.parentNode;
            c.appendChild(a)
        }

        function E(a) {
            for (var b = 0; b < a.childNodes.length; b++) {
                var c = a.childNodes[b];
                c.nodeType == 3 && !/\S/.test(c.nodeValue) && c.parentNode.removeChild(c)
            }
        }

        function F(a, b, c) {
            if (typeof b != "string")return;
            if (b === "") {
                x(a);
                return
            }
            y(a);
            var d = K(c), e = document.createElement("div");
            e.setAttribute("id", "msg" + a.name), e.className = c, e.innerHTML = "<span></span>" + b, D(e, a)
        }

        function G(a, b, c) {
            var d = function (b) {
                F(a, b, c)
            };
            if (typeof b == "function") {
                b(d);
                return
            }
            d(b)
        }

        function H(a, b, c) {
            var d = b.split("."), f = K(d[0], e)[0];
            f.onclick = function () {
                for (var b in a) {
                    var f = k[b], g = a[f.name];
                    for (var h in g) {
                        if (h == "indexOf")continue;
                        if (!g[h][0](f, g[h][1])) {
                            K(d[1], e)[0].innerHTML = g[h][2];
                            return
                        }
                    }
                }
                typeof c == "function" && c()
            }
        }

        function J(a, b, c) {
            var e = K(b)[0];
            e.onclick = function () {
                for (var e in a) {
                    var f = k[e];
                    if (!f.getAttribute("novalid") && !B(a, f, b))return
                }
                clearTimeout(I), I = setTimeout(function () {
                    for (var b in a) {
                        var e = k[b], f = d.error.split("="), g = e.parentNode.getElementsByTagName(f[0])[0];
                        if (g && (g.className == f[1] || g.className == ""))return
                    }
                    typeof c == "function" && c()
                }, 500)
            }
        }

        function K(a, b, c) {
            b == null && (b = document), c == null && (c = "*");
            var d = new Array, e = b.getElementsByTagName(c), f = " " + a + " ";
            for (i = 0, j = 0; i < e.length; i++) {
                var g = " " + e[i].className + " ";
                g.indexOf(f) != -1 && (d[j++] = e[i])
            }
            return d
        }

        function L(a, b) {
            var c = a.value;
            return c != "" && c != b
        }

        function M(a, b) {
            return a.value.length <= b
        }

        function N(a, b) {
            return a.value.length >= b
        }

        function O(a) {
            var b = /^([a-zA-Z0-9]+[_|\_|\.|\-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
            return b.test(a.value)
        }

        function P(a) {
            var b = /^\d{11}$/;
            return b.test(a.value)
        }

        function Q(a) {
            var b = /^(([0\+]\d{2,3}-)?(0\d{2,3}-?)|400|800)(\d{7,8})(-(\d+))?$/;
            return b.test(a.value)
        }

        function R(a) {
            return P(a) || Q(a)
        }

        function S(a) {
            var b = /^[0-9]{6}$/;
            return b.test(a.value)
        }

        function T(a, b) {
            var c = {yahoo: ["@yahoo", "@ymail"]};
            if (b in c) {
                var d = !0, e = c[b];
                for (var f = e.length; f--;)if (a.value.indexOf(e[f]) > -1) {
                    d = !1;
                    break
                }
                return d
            }
            return!0
        }

        function U(b, c) {
            var d = document.forms[a].elements[c].value;
            return d == "" || b.value == "" ? !0 : b.value === d
        }

        function V(a, b) {
            var c = 0;
            for (var d in a)a[d].checked && c++;
            return c < b
        }

        function W(a, b) {
            var c = 0;
            for (var d in a)a[d].checked && c++;
            return c > b
        }

        function X(a) {
            return a.checked
        }

        function Y(a, b, c) {
            c(function (c) {
                F(a, c, b)
            })
        }

        function Z(a) {
            return R(a) || P(a)
        }

        var e = document.forms[a];
        if (!e) {
            alert("不存在这个表单:" + a);
            return
        }
        var f = {req: L, maxlen: M, minlen: N, email: O, canEmail: T, mobile: P, tel: Q, phone: R, postcode: S, compare: U, selectmax: V, selectmin: W, selectradio: X, contact: Z}, g = {showmsgbyline: C, showmsgforsubmit: J, showmsgbyone: H}, h = "", k = e.elements, l = {};
        if (typeof b != "object") {
            alert("错误, validateRules参数错误... ");
            return
        }
        for (var m in b) {
            var n = b[m], o = k[m];
            l[m] = [];
            for (var p in n) {
                var q, r, s = n[p];
                (q = p.indexOf("=")) != -1 && (r = p.substring(q + 1), p = p.substring(0, q));
                var t = f[p];
                if (!t) {
                    alert("错误, 不存在这个验证规则");
                    return
                }
                l[m][p] = [t, r, s]
            }
        }
        for (var u in c) {
            var v = u.split("=");
            v[0] == "showmsgbyline" && (h = v[1]), g[v[0]](l, v[1], c[u])
        }
        var I;
        return{resetForm: z, addValid: w}
    }}
});
fml.define("component/urlHandle", [], function (a, b) {
    function d(a) {
        if (a == "")return"";
        var b = {}, c, d, e, f = a.indexOf("?") + 1, g = a.indexOf("#") == -1 ? a.length : a.indexOf("#"), h = a.slice(f, g), i = h.split("&");
        for (var e = 0, j = i.length; e < j; e++) {
            var k = i[e].indexOf("=");
            if (k > 0) {
                c = i[e].substring(0, k), d = i[e].substr(k + 1);
                try {
                    d.indexOf("+") > -1 && (d = d.replace(/\+/g, " ")), b[c] = decodeURIComponent(d)
                } catch (l) {
                }
            }
        }
        return delete b.frm, b
    }

    function e(a, b, c) {
        var d, e, f = [], g = function (a, b, c) {
            var d, e = [];
            b === !0 ? b = "1" : b === !1 && (b = "0");
            if (b != null) {
                if (typeof b == "object") {
                    for (d in b)b[d] != null && e.push(g(a + "[" + d + "]", b[d], c));
                    return e.join(c)
                }
                if (typeof b != "function")return encodeURIComponent(a) + "=" + encodeURIComponent(b);
                throw new Error("There was an error processing for http_build_query().")
            }
            return""
        };
        c || (c = "&");
        for (e in a) {
            d = a[e], b && !isNaN(e) && (e = String(b) + e);
            var h = g(e, d, c);
            h !== "" && f.push(h)
        }
        return f.join(c)
    }

    var c = function (a) {
        if (a == "")return"";
        var b = {};
        b = d(a);
        var c = document.createElement("A");
        c.href = a, b.hostDomain = c.host;
        var e = b.hostDomain.replace(/\.(com|cn|net|org)/g, "");
        return e = e.substr(e.lastIndexOf(".") + 1), b.rootDomain = b.hostDomain.substr(b.hostDomain.indexOf(e)), b
    };
    b.redirect = function (a) {
        var b = /MSIE (\d+\.\d+);/.test(navigator.userAgent);
        a || (location.href = location.href);
        if (b) {
            var c = document.createElement("a");
            c.href = a, document.body.appendChild(c), c.click()
        } else location.href = a
    }, b.getUrl = c, b.getParams = d, b.http_build_query = e
});
fml.define("component/storage", [], function (a, b) {
    var c = {cookieArr: {}, options: {domain: ".meilishuo.com", path: "/"}, setCookie: function (a, b, c) {
        c = c || {};
        var d = a + "=" + encodeURIComponent(b);
        c.domain || (c.domain = this.options.domain), c.path || (c.path = this.options.path), d += "; domain=" + c.domain, c.path && (d += "; path=" + c.path);
        if (c.duration) {
            var e = new Date;
            e.setTime(e.getTime() + c.duration * 1e3), d += "; expires=" + e.toGMTString()
        }
        return c.secure && (d += "; secure"), document.cookie = d + ";"
    }, getCookie: function (a) {
        return this.cookieArr[a] = this.cookieArr[a] || function () {
            var b = window.document.cookie.match("(?:^|;)\\s*" + a.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1") + "=([^;]*)");
            return b ? decodeURIComponent(b[1]) : undefined
        }(), this.cookieArr[a]
    }, removeCookie: function (a) {
        return this.setCookie(a, "", {duration: -1})
    }}, d = {set: function (a, b, c) {
        return c ? sessionStorage.setItem(a, b) : localStorage.setItem(a, b)
    }, get: function (a, b) {
        return b ? sessionStorage.getItem(a) : localStorage.getItem(a)
    }, remove: function (a, b) {
        return b ? sessionStorage.removeItem(a) : localStorage.removeItem(a)
    }}, e = {detectIE: function () {
        var a = navigator.userAgent.toLowerCase();
        if (window.ActiveXObject) {
            var b = a.match(/msie ([\d.]+)/)[1];
            if (b >= 5.5 && b < 8)return!0
        }
        return!1
    }, set: function (a, b, d) {
        return d ? c.setCookie(a, b) : c.setCookie(a, b, {duration: 864e4})
    }, get: function (a, b) {
        return c.getCookie(a)
    }, remove: function (a, b) {
        return c.remove(a)
    }};
    return{storage: function () {
        return e.detectIE() ? e : d
    }(), setCookie: function (a, b, d) {
        return c.setCookie(a, b, d)
    }, getCookie: function (a) {
        return c.getCookie(a)
    }, removeCookie: function (a) {
        return c.removeCookie(a)
    }, setSession: function (a, b) {
        return this.storage.set(a, b, !0)
    }, getSession: function (a) {
        return this.storage.get(a, !0)
    }, removeSession: function (a) {
        return this.storage.remove(a, !0)
    }, set: function (a, b) {
        return this.storage.set(a, b, !1)
    }, get: function (a) {
        return this.storage.get(a, !1)
    }, remove: function (a) {
        return this.storage.remove(a, !1)
    }}
});
fml.define("component/placeholder", ["jquery"], function (a, b) {
    var c = a("jquery"), d = "placeholder"in document.createElement("input");
    c.fn.placeholder = function (a) {
        var b = !1;
        a && "undefined" != typeof a.inheritStyle && (a.inheritStyle ? b = !0 : delete a.inheritStyle), a = b ? {} : c.extend(!0, {}, c.fn.placeholder.defaults, a);
        var e = a.placeholderCSS && a.placeholderCSS.left || "auto";
        return d ? this : this.each(function () {
            var b = c(this), d = c.trim(b.val()), e = b.width(), f = b.height(), g = this.id ? this.id : "placeholder" + Math.floor(Math.random() * 1123456789), h = b.attr("placeholder"), i = "placeholder-polyfill", j = c("<label for=" + g + ' class="' + i + '">' + h + "</label>");
            "undefined" == typeof a.placeholderCSS && (a.placeholderCSS = {}), a.placeholderCSS.width = e, a.placeholderCSS.height = f, a.placeholderCSS.color = a.placeholderCSS.color, a.placeholderCSS.left = b.css("padding-left"), j.css(a.placeholderCSS), a.needWrap && b.wrap(a.inputWrapper), b.attr("id", g).after(j), d && j.hide(), b.focus(function () {
                c.trim(b.val()) || j.hide()
            }), b.blur(function () {
                c.trim(b.val()) || j.show()
            })
        })
    }, c.fn.placeholder.defaults = {inputWrapper: '<span style="position:relative; display:block;"></span>', placeholderCSS: {font: "12px Arial", color: "#bababa", position: "absolute", top: "2px", "overflow-x": "hidden", display: "block", cursor: "text"}}
});
fml.define("jquery", [], function () {
    function E(a) {
        var b = D[a] = {};
        return n.each(a.split(q), function (a, c) {
            b[c] = !0
        }), b
    }

    function H(a, b, c) {
        if (c === undefined && a.nodeType === 1) {
            var d = "data-" + b.replace(G, "-$1").toLowerCase();
            c = a.getAttribute(d);
            if (typeof c == "string") {
                try {
                    c = c === "true" ? !0 : c === "false" ? !1 : c === "null" ? null : +c + "" === c ? +c : F.test(c) ? n.parseJSON(c) : c
                } catch (e) {
                }
                n.data(a, b, c)
            } else c = undefined
        }
        return c
    }

    function I(a) {
        var b;
        for (b in a) {
            if (b === "data" && n.isEmptyObject(a[b]))continue;
            if (b !== "toJSON")return!1
        }
        return!0
    }

    function $() {
        return!1
    }

    function _() {
        return!0
    }

    function fb(a) {
        return!a || !a.parentNode || a.parentNode.nodeType === 11
    }

    function gb(a, b) {
        do a = a[b]; while (a && a.nodeType !== 1);
        return a
    }

    function hb(a, b, c) {
        b = b || 0;
        if (n.isFunction(b))return n.grep(a, function (a, d) {
            var e = !!b.call(a, d, a);
            return e === c
        });
        if (b.nodeType)return n.grep(a, function (a, d) {
            return a === b === c
        });
        if (typeof b == "string") {
            var d = n.grep(a, function (a) {
                return a.nodeType === 1
            });
            if (cb.test(b))return n.filter(b, d, !c);
            b = n.filter(b, d)
        }
        return n.grep(a, function (a, d) {
            return n.inArray(a, b) >= 0 === c
        })
    }

    function ib(a) {
        var b = jb.split("|"), c = a.createDocumentFragment();
        if (c.createElement)while (b.length)c.createElement(b.pop());
        return c
    }

    function Ab(a, b) {
        return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b))
    }

    function Bb(a, b) {
        if (b.nodeType !== 1 || !n.hasData(a))return;
        var c, d, e, f = n._data(a), g = n._data(b, f), h = f.events;
        if (h) {
            delete g.handle, g.events = {};
            for (c in h)for (d = 0, e = h[c].length; d < e; d++)n.event.add(b, c, h[c][d])
        }
        g.data && (g.data = n.extend({}, g.data))
    }

    function Cb(a, b) {
        var c;
        if (b.nodeType !== 1)return;
        b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(), c === "object" ? (b.parentNode && (b.outerHTML = a.outerHTML), n.support.html5Clone && a.innerHTML && !n.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : c === "input" && tb.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : c === "option" ? b.selected = a.defaultSelected : c === "input" || c === "textarea" ? b.defaultValue = a.defaultValue : c === "script" && b.text !== a.text && (b.text = a.text), b.removeAttribute(n.expando)
    }

    function Db(a) {
        return typeof a.getElementsByTagName != "undefined" ? a.getElementsByTagName("*") : typeof a.querySelectorAll != "undefined" ? a.querySelectorAll("*") : []
    }

    function Eb(a) {
        tb.test(a.type) && (a.defaultChecked = a.checked)
    }

    function Vb(a, b) {
        if (b in a)return b;
        var c = b.charAt(0).toUpperCase() + b.slice(1), d = b, e = Tb.length;
        while (e--) {
            b = Tb[e] + c;
            if (b in a)return b
        }
        return d
    }

    function Wb(a, b) {
        return a = b || a, n.css(a, "display") === "none" || !n.contains(a.ownerDocument, a)
    }

    function Xb(a, b) {
        var c, d, e = [], f = 0, g = a.length;
        for (; f < g; f++) {
            c = a[f];
            if (!c.style)continue;
            e[f] = n._data(c, "olddisplay"), b ? (!e[f] && c.style.display === "none" && (c.style.display = ""), c.style.display === "" && Wb(c) && (e[f] = n._data(c, "olddisplay", _b(c.nodeName)))) : (d = Fb(c, "display"), !e[f] && d !== "none" && n._data(c, "olddisplay", d))
        }
        for (f = 0; f < g; f++) {
            c = a[f];
            if (!c.style)continue;
            if (!b || c.style.display === "none" || c.style.display === "")c.style.display = b ? e[f] || "" : "none"
        }
        return a
    }

    function Yb(a, b, c) {
        var d = Mb.exec(b);
        return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
    }

    function Zb(a, b, c, d) {
        var e = c === (d ? "border" : "content") ? 4 : b === "width" ? 1 : 0, f = 0;
        for (; e < 4; e += 2)c === "margin" && (f += n.css(a, c + Sb[e], !0)), d ? (c === "content" && (f -= parseFloat(Fb(a, "padding" + Sb[e])) || 0), c !== "margin" && (f -= parseFloat(Fb(a, "border" + Sb[e] + "Width")) || 0)) : (f += parseFloat(Fb(a, "padding" + Sb[e])) || 0, c !== "padding" && (f += parseFloat(Fb(a, "border" + Sb[e] + "Width")) || 0));
        return f
    }

    function $b(a, b, c) {
        var d = b === "width" ? a.offsetWidth : a.offsetHeight, e = !0, f = n.support.boxSizing && n.css(a, "boxSizing") === "border-box";
        if (d <= 0) {
            d = Fb(a, b);
            if (d < 0 || d == null)d = a.style[b];
            if (Nb.test(d))return d;
            e = f && (n.support.boxSizingReliable || d === a.style[b]), d = parseFloat(d) || 0
        }
        return d + Zb(a, b, c || (f ? "border" : "content"), e) + "px"
    }

    function _b(a) {
        if (Pb[a])return Pb[a];
        var b = n("<" + a + ">").appendTo(c.body), d = b.css("display");
        b.remove();
        if (d === "none" || d === "") {
            Gb = c.body.appendChild(Gb || n.extend(c.createElement("iframe"), {frameBorder: 0, width: 0, height: 0}));
            if (!Hb || !Gb.createElement)Hb = (Gb.contentWindow || Gb.contentDocument).document, Hb.write("<!doctype html><html><body>"), Hb.close();
            b = Hb.body.appendChild(Hb.createElement(a)), d = Fb(b, "display"), c.body.removeChild(Gb)
        }
        return Pb[a] = d, d
    }

    function fc(a, b, c, d) {
        var e;
        if (n.isArray(b))n.each(b, function (b, e) {
            c || bc.test(a) ? d(a, e) : fc(a + "[" + (typeof e == "object" ? b : "") + "]", e, c, d)
        }); else if (!c && n.type(b) === "object")for (e in b)fc(a + "[" + e + "]", b[e], c, d); else d(a, b)
    }

    function wc(a) {
        return function (b, c) {
            typeof b != "string" && (c = b, b = "*");
            var d, e, f, g = b.toLowerCase().split(q), h = 0, i = g.length;
            if (n.isFunction(c))for (; h < i; h++)d = g[h], f = /^\+/.test(d), f && (d = d.substr(1) || "*"), e = a[d] = a[d] || [], e[f ? "unshift" : "push"](c)
        }
    }

    function xc(a, b, c, d, e, f) {
        e = e || b.dataTypes[0], f = f || {}, f[e] = !0;
        var g, h = a[e], i = 0, j = h ? h.length : 0, k = a === sc;
        for (; i < j && (k || !g); i++)g = h[i](b, c, d), typeof g == "string" && (!k || f[g] ? g = undefined : (b.dataTypes.unshift(g), g = xc(a, b, c, d, g, f)));
        return(k || !g) && !f["*"] && (g = xc(a, b, c, d, "*", f)), g
    }

    function yc(a, b) {
        var c, d, e = n.ajaxSettings.flatOptions || {};
        for (c in b)b[c] !== undefined && ((e[c] ? a : d || (d = {}))[c] = b[c]);
        d && n.extend(!0, a, d)
    }

    function zc(a, b, c) {
        var d, e, f, g, h = a.contents, i = a.dataTypes, j = a.responseFields;
        for (e in j)e in c && (b[j[e]] = c[e]);
        while (i[0] === "*")i.shift(), d === undefined && (d = a.mimeType || b.getResponseHeader("content-type"));
        if (d)for (e in h)if (h[e] && h[e].test(d)) {
            i.unshift(e);
            break
        }
        if (i[0]in c)f = i[0]; else {
            for (e in c) {
                if (!i[0] || a.converters[e + " " + i[0]]) {
                    f = e;
                    break
                }
                g || (g = e)
            }
            f = f || g
        }
        if (f)return f !== i[0] && i.unshift(f), c[f]
    }

    function Ac(a, b) {
        var c, d, e, f, g = a.dataTypes.slice(), h = g[0], i = {}, j = 0;
        a.dataFilter && (b = a.dataFilter(b, a.dataType));
        if (g[1])for (c in a.converters)i[c.toLowerCase()] = a.converters[c];
        for (; e = g[++j];)if (e !== "*") {
            if (h !== "*" && h !== e) {
                c = i[h + " " + e] || i["* " + e];
                if (!c)for (d in i) {
                    f = d.split(" ");
                    if (f[1] === e) {
                        c = i[h + " " + f[0]] || i["* " + f[0]];
                        if (c) {
                            c === !0 ? c = i[d] : i[d] !== !0 && (e = f[0], g.splice(j--, 0, e));
                            break
                        }
                    }
                }
                if (c !== !0)if (c && a["throws"])b = c(b); else try {
                    b = c(b)
                } catch (k) {
                    return{state: "parsererror", error: c ? k : "No conversion from " + h + " to " + e}
                }
            }
            h = e
        }
        return{state: "success", data: b}
    }

    function Ic() {
        try {
            return new window.XMLHttpRequest
        } catch (a) {
        }
    }

    function Jc() {
        try {
            return new window.ActiveXObject("Microsoft.XMLHTTP")
        } catch (a) {
        }
    }

    function Rc() {
        return setTimeout(function () {
            Kc = undefined
        }, 0), Kc = n.now()
    }

    function Sc(a, b) {
        n.each(b, function (b, c) {
            var d = (Qc[b] || []).concat(Qc["*"]), e = 0, f = d.length;
            for (; e < f; e++)if (d[e].call(a, b, c))return
        })
    }

    function Tc(a, b, c) {
        var d, e = 0, f = 0, g = Pc.length, h = n.Deferred().always(function () {
            delete i.elem
        }), i = function () {
            var b = Kc || Rc(), c = Math.max(0, j.startTime + j.duration - b), d = 1 - (c / j.duration || 0), e = 0, f = j.tweens.length;
            for (; e < f; e++)j.tweens[e].run(d);
            return h.notifyWith(a, [j, d, c]), d < 1 && f ? c : (h.resolveWith(a, [j]), !1)
        }, j = h.promise({elem: a, props: n.extend({}, b), opts: n.extend(!0, {specialEasing: {}}, c), originalProperties: b, originalOptions: c, startTime: Kc || Rc(), duration: c.duration, tweens: [], createTween: function (b, c, d) {
            var e = n.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
            return j.tweens.push(e), e
        }, stop: function (b) {
            var c = 0, d = b ? j.tweens.length : 0;
            for (; c < d; c++)j.tweens[c].run(1);
            return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this
        }}), k = j.props;
        Uc(k, j.opts.specialEasing);
        for (; e < g; e++) {
            d = Pc[e].call(j, a, k, j.opts);
            if (d)return d
        }
        return Sc(j, k), n.isFunction(j.opts.start) && j.opts.start.call(a, j), n.fx.timer(n.extend(i, {anim: j, queue: j.opts.queue, elem: a})), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always)
    }

    function Uc(a, b) {
        var c, d, e, f, g;
        for (c in a) {
            d = n.camelCase(c), e = b[d], f = a[c], n.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = n.cssHooks[d];
            if (g && "expand"in g) {
                f = g.expand(f), delete a[d];
                for (c in f)c in a || (a[c] = f[c], b[c] = e)
            } else b[d] = e
        }
    }

    function Vc(a, b, c) {
        var d, e, f, g, h, i, j, k, l = this, m = a.style, o = {}, p = [], q = a.nodeType && Wb(a);
        c.queue || (j = n._queueHooks(a, "fx"), j.unqueued == null && (j.unqueued = 0, k = j.empty.fire, j.empty.fire = function () {
            j.unqueued || k()
        }), j.unqueued++, l.always(function () {
            l.always(function () {
                j.unqueued--, n.queue(a, "fx").length || j.empty.fire()
            })
        })), a.nodeType === 1 && ("height"in b || "width"in b) && (c.overflow = [m.overflow, m.overflowX, m.overflowY], n.css(a, "display") === "inline" && n.css(a, "float") === "none" && (!n.support.inlineBlockNeedsLayout || _b(a.nodeName) === "inline" ? m.display = "inline-block" : m.zoom = 1)), c.overflow && (m.overflow = "hidden", n.support.shrinkWrapBlocks || l.done(function () {
            m.overflow = c.overflow[0], m.overflowX = c.overflow[1], m.overflowY = c.overflow[2]
        }));
        for (d in b) {
            f = b[d];
            if (Mc.exec(f)) {
                delete b[d];
                if (f === (q ? "hide" : "show"))continue;
                p.push(d)
            }
        }
        g = p.length;
        if (g) {
            h = n._data(a, "fxshow") || n._data(a, "fxshow", {}), q ? n(a).show() : l.done(function () {
                n(a).hide()
            }), l.done(function () {
                var b;
                n.removeData(a, "fxshow", !0);
                for (b in o)n.style(a, b, o[b])
            });
            for (d = 0; d < g; d++)e = p[d], i = l.createTween(e, q ? h[e] : 0), o[e] = h[e] || n.style(a, e), e in h || (h[e] = i.start, q && (i.end = i.start, i.start = e === "width" || e === "height" ? 1 : 0))
        }
    }

    function Wc(a, b, c, d, e) {
        return new Wc.prototype.init(a, b, c, d, e)
    }

    function Xc(a, b) {
        var c, d = {height: a}, e = 0;
        for (; e < 4; e += 2 - b)c = Sb[e], d["margin" + c] = d["padding" + c] = a;
        return b && (d.opacity = d.width = a), d
    }

    function Zc(a) {
        return n.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1
    }

    var a, b, c = window.document, d = window.location, e = window.navigator, f = window.jQuery, g = window.$, h = Array.prototype.push, i = Array.prototype.slice, j = Array.prototype.indexOf, k = Object.prototype.toString, l = Object.prototype.hasOwnProperty, m = String.prototype.trim, n = function (b, c) {
        return new n.fn.init(b, c, a)
    }, o = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, p = /\S/, q = /\s+/, r = p.test(" ") ? /^[\s\xA0]+|[\s\xA0]+$/g : /^\s+|\s+$/g, s = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, t = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, u = /^[\],:{}\s]*$/, v = /(?:^|:|,)(?:\s*\[)+/g, w = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, x = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, y = /^-ms-/, z = /-([\da-z])/gi, A = function (a, b) {
        return(b + "").toUpperCase()
    }, B = function () {
        c.addEventListener ? (c.removeEventListener("DOMContentLoaded", B, !1), n.ready()) : c.readyState === "complete" && (c.detachEvent("onreadystatechange", B), n.ready())
    }, C = {};
    n.fn = n.prototype = {constructor: n, init: function (a, b, d) {
        var e, f, g, h;
        if (!a)return this;
        if (a.nodeType)return this.context = this[0] = a, this.length = 1, this;
        if (typeof a == "string") {
            a.charAt(0) === "<" && a.charAt(a.length - 1) === ">" && a.length >= 3 ? e = [null, a, null] : e = s.exec(a);
            if (e && (e[1] || !b)) {
                if (e[1])return b = b instanceof n ? b[0] : b, h = b && b.nodeType ? b.ownerDocument || b : c, a = n.parseHTML(e[1], h, !0), t.test(e[1]) && n.isPlainObject(b) && this.attr.call(a, b, !0), n.merge(this, a);
                f = c.getElementById(e[2]);
                if (f && f.parentNode) {
                    if (f.id !== e[2])return d.find(a);
                    this.length = 1, this[0] = f
                }
                return this.context = c, this.selector = a, this
            }
            return!b || b.jquery ? (b || d).find(a) : this.constructor(b).find(a)
        }
        return n.isFunction(a) ? d.ready(a) : (a.selector !== undefined && (this.selector = a.selector, this.context = a.context), n.makeArray(a, this))
    }, selector: "", jquery: "1.8.0", length: 0, size: function () {
        return this.length
    }, toArray: function () {
        return i.call(this)
    }, get: function (a) {
        return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a]
    }, pushStack: function (a, b, c) {
        var d = n.merge(this.constructor(), a);
        return d.prevObject = this, d.context = this.context, b === "find" ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")"), d
    }, each: function (a, b) {
        return n.each(this, a, b)
    }, ready: function (a) {
        return n.ready.promise().done(a), this
    }, eq: function (a) {
        return a = +a, a === -1 ? this.slice(a) : this.slice(a, a + 1)
    }, first: function () {
        return this.eq(0)
    }, last: function () {
        return this.eq(-1)
    }, slice: function () {
        return this.pushStack(i.apply(this, arguments), "slice", i.call(arguments).join(","))
    }, map: function (a) {
        return this.pushStack(n.map(this, function (b, c) {
            return a.call(b, c, b)
        }))
    }, end: function () {
        return this.prevObject || this.constructor(null)
    }, push: h, sort: [].sort, splice: [].splice}, n.fn.init.prototype = n.fn, n.extend = n.fn.extend = function () {
        var a, b, c, d, e, f, g = arguments[0] || {}, h = 1, i = arguments.length, j = !1;
        typeof g == "boolean" && (j = g, g = arguments[1] || {}, h = 2), typeof g != "object" && !n.isFunction(g) && (g = {}), i === h && (g = this, --h);
        for (; h < i; h++)if ((a = arguments[h]) != null)for (b in a) {
            c = g[b], d = a[b];
            if (g === d)continue;
            j && d && (n.isPlainObject(d) || (e = n.isArray(d))) ? (e ? (e = !1, f = c && n.isArray(c) ? c : []) : f = c && n.isPlainObject(c) ? c : {}, g[b] = n.extend(j, f, d)) : d !== undefined && (g[b] = d)
        }
        return g
    }, n.extend({noConflict: function (a) {
        return window.$ === n && (window.$ = g), a && window.jQuery === n && (window.jQuery = f), n
    }, isReady: !1, readyWait: 1, holdReady: function (a) {
        a ? n.readyWait++ : n.ready(!0)
    }, ready: function (a) {
        if (a === !0 ? --n.readyWait : n.isReady)return;
        if (!c.body)return setTimeout(n.ready, 1);
        n.isReady = !0;
        if (a !== !0 && --n.readyWait > 0)return;
        b.resolveWith(c, [n]), n.fn.trigger && n(c).trigger("ready").off("ready")
    }, isFunction: function (a) {
        return n.type(a) === "function"
    }, isArray: Array.isArray || function (a) {
        return n.type(a) === "array"
    }, isWindow: function (a) {
        return a != null && a == a.window
    }, isNumeric: function (a) {
        return!isNaN(parseFloat(a)) && isFinite(a)
    }, type: function (a) {
        return a == null ? String(a) : C[k.call(a)] || "object"
    }, isPlainObject: function (a) {
        if (!a || n.type(a) !== "object" || a.nodeType || n.isWindow(a))return!1;
        try {
            if (a.constructor && !l.call(a, "constructor") && !l.call(a.constructor.prototype, "isPrototypeOf"))return!1
        } catch (b) {
            return!1
        }
        var c;
        for (c in a);
        return c === undefined || l.call(a, c)
    }, isEmptyObject: function (a) {
        var b;
        for (b in a)return!1;
        return!0
    }, error: function (a) {
        throw new Error(a)
    }, parseHTML: function (a, b, d) {
        var e;
        return!a || typeof a != "string" ? null : (typeof b == "boolean" && (d = b, b = 0), b = b || c, (e = t.exec(a)) ? [b.createElement(e[1])] : (e = n.buildFragment([a], b, d ? null : []), n.merge([], (e.cacheable ? n.clone(e.fragment) : e.fragment).childNodes)))
    }, parseJSON: function (a) {
        if (!a || typeof a != "string")return null;
        a = n.trim(a);
        if (window.JSON && window.JSON.parse)return window.JSON.parse(a);
        if (u.test(a.replace(w, "@").replace(x, "]").replace(v, "")))return(new Function("return " + a))();
        n.error("Invalid JSON: " + a)
    }, parseXML: function (a) {
        var b, c;
        if (!a || typeof a != "string")return null;
        try {
            window.DOMParser ? (c = new DOMParser, b = c.parseFromString(a, "text/xml")) : (b = new ActiveXObject("Microsoft.XMLDOM"), b.async = "false", b.loadXML(a))
        } catch (d) {
            b = undefined
        }
        return(!b || !b.documentElement || b.getElementsByTagName("parsererror").length) && n.error("Invalid XML: " + a), b
    }, noop: function () {
    }, globalEval: function (a) {
        a && p.test(a) && (window.execScript || function (a) {
            window.eval.call(window, a)
        })(a)
    }, camelCase: function (a) {
        return a.replace(y, "ms-").replace(z, A)
    }, nodeName: function (a, b) {
        return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
    }, each: function (a, b, c) {
        var d, e = 0, f = a.length, g = f === undefined || n.isFunction(a);
        if (c) {
            if (g) {
                for (d in a)if (b.apply(a[d], c) === !1)break
            } else for (; e < f;)if (b.apply(a[e++], c) === !1)break
        } else if (g) {
            for (d in a)if (b.call(a[d], d, a[d]) === !1)break
        } else for (; e < f;)if (b.call(a[e], e, a[e++]) === !1)break;
        return a
    }, trim: m ? function (a) {
        return a == null ? "" : m.call(a)
    } : function (a) {
        return a == null ? "" : a.toString().replace(r, "")
    }, makeArray: function (a, b) {
        var c, d = b || [];
        return a != null && (c = n.type(a), a.length == null || c === "string" || c === "function" || c === "regexp" || n.isWindow(a) ? h.call(d, a) : n.merge(d, a)), d
    }, inArray: function (a, b, c) {
        var d;
        if (b) {
            if (j)return j.call(b, a, c);
            d = b.length, c = c ? c < 0 ? Math.max(0, d + c) : c : 0;
            for (; c < d; c++)if (c in b && b[c] === a)return c
        }
        return-1
    }, merge: function (a, b) {
        var c = b.length, d = a.length, e = 0;
        if (typeof c == "number")for (; e < c; e++)a[d++] = b[e]; else while (b[e] !== undefined)a[d++] = b[e++];
        return a.length = d, a
    }, grep: function (a, b, c) {
        var d, e = [], f = 0, g = a.length;
        c = !!c;
        for (; f < g; f++)d = !!b(a[f], f), c !== d && e.push(a[f]);
        return e
    }, map: function (a, b, c) {
        var d, e, f = [], g = 0, h = a.length, i = a instanceof n || h !== undefined && typeof h == "number" && (h > 0 && a[0] && a[h - 1] || h === 0 || n.isArray(a));
        if (i)for (; g < h; g++)d = b(a[g], g, c), d != null && (f[f.length] = d); else for (e in a)d = b(a[e], e, c), d != null && (f[f.length] = d);
        return f.concat.apply([], f)
    }, guid: 1, proxy: function (a, b) {
        var c, d, e;
        return typeof b == "string" && (c = a[b], b = a, a = c), n.isFunction(a) ? (d = i.call(arguments, 2), e = function () {
            return a.apply(b, d.concat(i.call(arguments)))
        }, e.guid = a.guid = a.guid || e.guid || n.guid++, e) : undefined
    }, access: function (a, b, c, d, e, f, g) {
        var h, i = c == null, j = 0, k = a.length;
        if (c && typeof c == "object") {
            for (j in c)n.access(a, b, j, c[j], 1, f, d);
            e = 1
        } else if (d !== undefined) {
            h = g === undefined && n.isFunction(d), i && (h ? (h = b, b = function (a, b, c) {
                return h.call(n(a), c)
            }) : (b.call(a, d), b = null));
            if (b)for (; j < k; j++)b(a[j], c, h ? d.call(a[j], j, b(a[j], c)) : d, g);
            e = 1
        }
        return e ? a : i ? b.call(a) : k ? b(a[0], c) : f
    }, now: function () {
        return(new Date).getTime()
    }}), n.ready.promise = function (a) {
        if (!b) {
            b = n.Deferred();
            if (c.readyState === "complete" || c.readyState !== "loading" && c.addEventListener)setTimeout(n.ready, 1); else if (c.addEventListener)c.addEventListener("DOMContentLoaded", B, !1), window.addEventListener("load", n.ready, !1); else {
                c.attachEvent("onreadystatechange", B), window.attachEvent("onload", n.ready);
                var d = !1;
                try {
                    d = window.frameElement == null && c.documentElement
                } catch (e) {
                }
                d && d.doScroll && function f() {
                    if (!n.isReady) {
                        try {
                            d.doScroll("left")
                        } catch (a) {
                            return setTimeout(f, 50)
                        }
                        n.ready()
                    }
                }()
            }
        }
        return b.promise(a)
    }, n.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (a, b) {
        C["[object " + b + "]"] = b.toLowerCase()
    }), a = n(c);
    var D = {};
    n.Callbacks = function (a) {
        a = typeof a == "string" ? D[a] || E(a) : n.extend({}, a);
        var b, c, d, e, f, g, h = [], i = !a.once && [], j = function (l) {
            b = a.memory && l, c = !0, g = e || 0, e = 0, f = h.length, d = !0;
            for (; h && g < f; g++)if (h[g].apply(l[0], l[1]) === !1 && a.stopOnFalse) {
                b = !1;
                break
            }
            d = !1, h && (i ? i.length && j(i.shift()) : b ? h = [] : k.disable())
        }, k = {add: function () {
            if (h) {
                var c = h.length;
                (function g(b) {
                    n.each(b, function (b, c) {
                        n.isFunction(c) && (!a.unique || !k.has(c)) ? h.push(c) : c && c.length && g(c)
                    })
                })(arguments), d ? f = h.length : b && (e = c, j(b))
            }
            return this
        }, remove: function () {
            return h && n.each(arguments, function (a, b) {
                var c;
                while ((c = n.inArray(b, h, c)) > -1)h.splice(c, 1), d && (c <= f && f--, c <= g && g--)
            }), this
        }, has: function (a) {
            return n.inArray(a, h) > -1
        }, empty: function () {
            return h = [], this
        }, disable: function () {
            return h = i = b = undefined, this
        }, disabled: function () {
            return!h
        }, lock: function () {
            return i = undefined, b || k.disable(), this
        }, locked: function () {
            return!i
        }, fireWith: function (a, b) {
            return b = b || [], b = [a, b.slice ? b.slice() : b], h && (!c || i) && (d ? i.push(b) : j(b)), this
        }, fire: function () {
            return k.fireWith(this, arguments), this
        }, fired: function () {
            return!!c
        }};
        return k
    }, n.extend({Deferred: function (a) {
        var b = [
            ["resolve", "done", n.Callbacks("once memory"), "resolved"],
            ["reject", "fail", n.Callbacks("once memory"), "rejected"],
            ["notify", "progress", n.Callbacks("memory")]
        ], c = "pending", d = {state: function () {
            return c
        }, always: function () {
            return e.done(arguments).fail(arguments), this
        }, then: function () {
            var a = arguments;
            return n.Deferred(function (c) {
                n.each(b, function (b, d) {
                    var f = d[0], g = a[b];
                    e[d[1]](n.isFunction(g) ? function () {
                        var a = g.apply(this, arguments);
                        a && n.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f + "With"](this === e ? c : this, [a])
                    } : c[f])
                }), a = null
            }).promise()
        }, promise: function (a) {
            return typeof a == "object" ? n.extend(a, d) : d
        }}, e = {};
        return d.pipe = d.then, n.each(b, function (a, f) {
            var g = f[2], h = f[3];
            d[f[1]] = g.add, h && g.add(function () {
                c = h
            }, b[a ^ 1][2].disable, b[2][2].lock), e[f[0]] = g.fire, e[f[0] + "With"] = g.fireWith
        }), d.promise(e), a && a.call(e, e), e
    }, when: function (a) {
        var b = 0, c = i.call(arguments), d = c.length, e = d !== 1 || a && n.isFunction(a.promise) ? d : 0, f = e === 1 ? a : n.Deferred(), g = function (a, b, c) {
            return function (d) {
                b[a] = this, c[a] = arguments.length > 1 ? i.call(arguments) : d, c === h ? f.notifyWith(b, c) : --e || f.resolveWith(b, c)
            }
        }, h, j, k;
        if (d > 1) {
            h = new Array(d), j = new Array(d), k = new Array(d);
            for (; b < d; b++)c[b] && n.isFunction(c[b].promise) ? c[b].promise().done(g(b, k, c)).fail(f.reject).progress(g(b, j, h)) : --e
        }
        return e || f.resolveWith(k, c), f.promise()
    }}), n.support = function () {
        var a, b, d, e, f, g, h, i, j, k, l, m = c.createElement("div");
        m.setAttribute("className", "t"), m.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", b = m.getElementsByTagName("*"), d = m.getElementsByTagName("a")[0], d.style.cssText = "top:1px;float:left;opacity:.5";
        if (!b || !b.length || !d)return{};
        e = c.createElement("select"), f = e.appendChild(c.createElement("option")), g = m.getElementsByTagName("input")[0], a = {leadingWhitespace: m.firstChild.nodeType === 3, tbody: !m.getElementsByTagName("tbody").length, htmlSerialize: !!m.getElementsByTagName("link").length, style: /top/.test(d.getAttribute("style")), hrefNormalized: d.getAttribute("href") === "/a", opacity: /^0.5/.test(d.style.opacity), cssFloat: !!d.style.cssFloat, checkOn: g.value === "on", optSelected: f.selected, getSetAttribute: m.className !== "t", enctype: !!c.createElement("form").enctype, html5Clone: c.createElement("nav").cloneNode(!0).outerHTML !== "<:nav></:nav>", boxModel: c.compatMode === "CSS1Compat", submitBubbles: !0, changeBubbles: !0, focusinBubbles: !1, deleteExpando: !0, noCloneEvent: !0, inlineBlockNeedsLayout: !1, shrinkWrapBlocks: !1, reliableMarginRight: !0, boxSizingReliable: !0, pixelPosition: !1}, g.checked = !0, a.noCloneChecked = g.cloneNode(!0).checked, e.disabled = !0, a.optDisabled = !f.disabled;
        try {
            delete m.test
        } catch (o) {
            a.deleteExpando = !1
        }
        !m.addEventListener && m.attachEvent && m.fireEvent && (m.attachEvent("onclick", l = function () {
            a.noCloneEvent = !1
        }), m.cloneNode(!0).fireEvent("onclick"), m.detachEvent("onclick", l)), g = c.createElement("input"), g.value = "t", g.setAttribute("type", "radio"), a.radioValue = g.value === "t", g.setAttribute("checked", "checked"), g.setAttribute("name", "t"), m.appendChild(g), h = c.createDocumentFragment(), h.appendChild(m.lastChild), a.checkClone = h.cloneNode(!0).cloneNode(!0).lastChild.checked, a.appendChecked = g.checked, h.removeChild(g), h.appendChild(m);
        if (m.attachEvent)for (j in{submit: !0, change: !0, focusin: !0})i = "on" + j, k = i in m, k || (m.setAttribute(i, "return;"), k = typeof m[i] == "function"), a[j + "Bubbles"] = k;
        return n(function () {
            var b, d, e, f, g = "padding:0;margin:0;border:0;display:block;overflow:hidden;", h = c.getElementsByTagName("body")[0];
            if (!h)return;
            b = c.createElement("div"), b.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", h.insertBefore(b, h.firstChild), d = c.createElement("div"), b.appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", e = d.getElementsByTagName("td"), e[0].style.cssText = "padding:0;margin:0;border:0;display:none", k = e[0].offsetHeight === 0, e[0].style.display = "", e[1].style.display = "none", a.reliableHiddenOffsets = k && e[0].offsetHeight === 0, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", a.boxSizing = d.offsetWidth === 4, a.doesNotIncludeMarginInBodyOffset = h.offsetTop !== 1, window.getComputedStyle && (a.pixelPosition = (window.getComputedStyle(d, null) || {}).top !== "1%", a.boxSizingReliable = (window.getComputedStyle(d, null) || {width: "4px"}).width === "4px", f = c.createElement("div"), f.style.cssText = d.style.cssText = g, f.style.marginRight = f.style.width = "0", d.style.width = "1px", d.appendChild(f), a.reliableMarginRight = !parseFloat((window.getComputedStyle(f, null) || {}).marginRight)), typeof d.style.zoom != "undefined" && (d.innerHTML = "", d.style.cssText = g + "width:1px;padding:1px;display:inline;zoom:1", a.inlineBlockNeedsLayout = d.offsetWidth === 3, d.style.display = "block", d.style.overflow = "visible", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", a.shrinkWrapBlocks = d.offsetWidth !== 3, b.style.zoom = 1), h.removeChild(b), b = d = e = f = null
        }), h.removeChild(m), b = d = e = f = g = h = m = null, a
    }();
    var F = /^(?:\{.*\}|\[.*\])$/, G = /([A-Z])/g;
    n.extend({cache: {}, deletedIds: [], uuid: 0, expando: "jQuery" + (n.fn.jquery + Math.random()).replace(/\D/g, ""), noData: {embed: !0, object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet: !0}, hasData: function (a) {
        return a = a.nodeType ? n.cache[a[n.expando]] : a[n.expando], !!a && !I(a)
    }, data: function (a, b, c, d) {
        if (!n.acceptData(a))return;
        var e, f, g = n.expando, h = typeof b == "string", i = a.nodeType, j = i ? n.cache : a, k = i ? a[g] : a[g] && g;
        if ((!k || !j[k] || !d && !j[k].data) && h && c === undefined)return;
        k || (i ? a[g] = k = n.deletedIds.pop() || ++n.uuid : k = g), j[k] || (j[k] = {}, i || (j[k].toJSON = n.noop));
        if (typeof b == "object" || typeof b == "function")d ? j[k] = n.extend(j[k], b) : j[k].data = n.extend(j[k].data, b);
        return e = j[k], d || (e.data || (e.data = {}), e = e.data), c !== undefined && (e[n.camelCase(b)] = c), h ? (f = e[b], f == null && (f = e[n.camelCase(b)])) : f = e, f
    }, removeData: function (a, b, c) {
        if (!n.acceptData(a))return;
        var d, e, f, g = a.nodeType, h = g ? n.cache : a, i = g ? a[n.expando] : n.expando;
        if (!h[i])return;
        if (b) {
            d = c ? h[i] : h[i].data;
            if (d) {
                n.isArray(b) || (b in d ? b = [b] : (b = n.camelCase(b), b in d ? b = [b] : b = b.split(" ")));
                for (e = 0, f = b.length; e < f; e++)delete d[b[e]];
                if (!(c ? I : n.isEmptyObject)(d))return
            }
        }
        if (!c) {
            delete h[i].data;
            if (!I(h[i]))return
        }
        g ? n.cleanData([a], !0) : n.support.deleteExpando || h != h.window ? delete h[i] : h[i] = null
    }, _data: function (a, b, c) {
        return n.data(a, b, c, !0)
    }, acceptData: function (a) {
        var b = a.nodeName && n.noData[a.nodeName.toLowerCase()];
        return!b || b !== !0 && a.getAttribute("classid") === b
    }}), n.fn.extend({data: function (a, b) {
        var c, d, e, f, g, h = this[0], i = 0, j = null;
        if (a === undefined) {
            if (this.length) {
                j = n.data(h);
                if (h.nodeType === 1 && !n._data(h, "parsedAttrs")) {
                    e = h.attributes;
                    for (g = e.length; i < g; i++)f = e[i].name, f.indexOf("data-") === 0 && (f = n.camelCase(f.substring(5)), H(h, f, j[f]));
                    n._data(h, "parsedAttrs", !0)
                }
            }
            return j
        }
        return typeof a == "object" ? this.each(function () {
            n.data(this, a)
        }) : (c = a.split(".", 2), c[1] = c[1] ? "." + c[1] : "", d = c[1] + "!", n.access(this, function (b) {
            if (b === undefined)return j = this.triggerHandler("getData" + d, [c[0]]), j === undefined && h && (j = n.data(h, a), j = H(h, a, j)), j === undefined && c[1] ? this.data(c[0]) : j;
            c[1] = b, this.each(function () {
                var e = n(this);
                e.triggerHandler("setData" + d, c), n.data(this, a, b), e.triggerHandler("changeData" + d, c)
            })
        }, null, b, arguments.length > 1, null, !1))
    }, removeData: function (a) {
        return this.each(function () {
            n.removeData(this, a)
        })
    }}), n.extend({queue: function (a, b, c) {
        var d;
        if (a)return b = (b || "fx") + "queue", d = n._data(a, b), c && (!d || n.isArray(c) ? d = n._data(a, b, n.makeArray(c)) : d.push(c)), d || []
    }, dequeue: function (a, b) {
        b = b || "fx";
        var c = n.queue(a, b), d = c.shift(), e = n._queueHooks(a, b), f = function () {
            n.dequeue(a, b)
        };
        d === "inprogress" && (d = c.shift()), d && (b === "fx" && c.unshift("inprogress"), delete e.stop, d.call(a, f, e)), !c.length && e && e.empty.fire()
    }, _queueHooks: function (a, b) {
        var c = b + "queueHooks";
        return n._data(a, c) || n._data(a, c, {empty: n.Callbacks("once memory").add(function () {
            n.removeData(a, b + "queue", !0), n.removeData(a, c, !0)
        })})
    }}), n.fn.extend({queue: function (a, b) {
        var c = 2;
        return typeof a != "string" && (b = a, a = "fx", c--), arguments.length < c ? n.queue(this[0], a) : b === undefined ? this : this.each(function () {
            var c = n.queue(this, a, b);
            n._queueHooks(this, a), a === "fx" && c[0] !== "inprogress" && n.dequeue(this, a)
        })
    }, dequeue: function (a) {
        return this.each(function () {
            n.dequeue(this, a)
        })
    }, delay: function (a, b) {
        return a = n.fx ? n.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function (b, c) {
            var d = setTimeout(b, a);
            c.stop = function () {
                clearTimeout(d)
            }
        })
    }, clearQueue: function (a) {
        return this.queue(a || "fx", [])
    }, promise: function (a, b) {
        var c, d = 1, e = n.Deferred(), f = this, g = this.length, h = function () {
            --d || e.resolveWith(f, [f])
        };
        typeof a != "string" && (b = a, a = undefined), a = a || "fx";
        while (g--)(c = n._data(f[g], a + "queueHooks")) && c.empty && (d++, c.empty.add(h));
        return h(), e.promise(b)
    }});
    var J, K, L, M = /[\t\r\n]/g, N = /\r/g, O = /^(?:button|input)$/i, P = /^(?:button|input|object|select|textarea)$/i, Q = /^a(?:rea|)$/i, R = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, S = n.support.getSetAttribute;
    n.fn.extend({attr: function (a, b) {
        return n.access(this, n.attr, a, b, arguments.length > 1)
    }, removeAttr: function (a) {
        return this.each(function () {
            n.removeAttr(this, a)
        })
    }, prop: function (a, b) {
        return n.access(this, n.prop, a, b, arguments.length > 1)
    }, removeProp: function (a) {
        return a = n.propFix[a] || a, this.each(function () {
            try {
                this[a] = undefined, delete this[a]
            } catch (b) {
            }
        })
    }, addClass: function (a) {
        var b, c, d, e, f, g, h;
        if (n.isFunction(a))return this.each(function (b) {
            n(this).addClass(a.call(this, b, this.className))
        });
        if (a && typeof a == "string") {
            b = a.split(q);
            for (c = 0, d = this.length; c < d; c++) {
                e = this[c];
                if (e.nodeType === 1)if (!e.className && b.length === 1)e.className = a; else {
                    f = " " + e.className + " ";
                    for (g = 0, h = b.length; g < h; g++)~f.indexOf(" " + b[g] + " ") || (f += b[g] + " ");
                    e.className = n.trim(f)
                }
            }
        }
        return this
    }, removeClass: function (a) {
        var b, c, d, e, f, g, h;
        if (n.isFunction(a))return this.each(function (b) {
            n(this).removeClass(a.call(this, b, this.className))
        });
        if (a && typeof a == "string" || a === undefined) {
            b = (a || "").split(q);
            for (g = 0, h = this.length; g < h; g++) {
                d = this[g];
                if (d.nodeType === 1 && d.className) {
                    c = (" " + d.className + " ").replace(M, " ");
                    for (e = 0, f = b.length; e < f; e++)while (c.indexOf(" " + b[e] + " ") > -1)c = c.replace(" " + b[e] + " ", " ");
                    d.className = a ? n.trim(c) : ""
                }
            }
        }
        return this
    }, toggleClass: function (a, b) {
        var c = typeof a, d = typeof b == "boolean";
        return n.isFunction(a) ? this.each(function (c) {
            n(this).toggleClass(a.call(this, c, this.className, b), b)
        }) : this.each(function () {
            if (c === "string") {
                var e, f = 0, g = n(this), h = b, i = a.split(q);
                while (e = i[f++])h = d ? h : !g.hasClass(e), g[h ? "addClass" : "removeClass"](e)
            } else if (c === "undefined" || c === "boolean")this.className && n._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : n._data(this, "__className__") || ""
        })
    }, hasClass: function (a) {
        var b = " " + a + " ", c = 0, d = this.length;
        for (; c < d; c++)if (this[c].nodeType === 1 && (" " + this[c].className + " ").replace(M, " ").indexOf(b) > -1)return!0;
        return!1
    }, val: function (a) {
        var b, c, d, e = this[0];
        if (!arguments.length) {
            if (e)return b = n.valHooks[e.type] || n.valHooks[e.nodeName.toLowerCase()], b && "get"in b && (c = b.get(e, "value")) !== undefined ? c : (c = e.value, typeof c == "string" ? c.replace(N, "") : c == null ? "" : c);
            return
        }
        return d = n.isFunction(a), this.each(function (c) {
            var e, f = n(this);
            if (this.nodeType !== 1)return;
            d ? e = a.call(this, c, f.val()) : e = a, e == null ? e = "" : typeof e == "number" ? e += "" : n.isArray(e) && (e = n.map(e, function (a) {
                return a == null ? "" : a + ""
            })), b = n.valHooks[this.type] || n.valHooks[this.nodeName.toLowerCase()];
            if (!b || !("set"in b) || b.set(this, e, "value") === undefined)this.value = e
        })
    }}), n.extend({valHooks: {option: {get: function (a) {
        var b = a.attributes.value;
        return!b || b.specified ? a.value : a.text
    }}, select: {get: function (a) {
        var b, c, d, e, f = a.selectedIndex, g = [], h = a.options, i = a.type === "select-one";
        if (f < 0)return null;
        c = i ? f : 0, d = i ? f + 1 : h.length;
        for (; c < d; c++) {
            e = h[c];
            if (e.selected && (n.support.optDisabled ? !e.disabled : e.getAttribute("disabled") === null) && (!e.parentNode.disabled || !n.nodeName(e.parentNode, "optgroup"))) {
                b = n(e).val();
                if (i)return b;
                g.push(b)
            }
        }
        return i && !g.length && h.length ? n(h[f]).val() : g
    }, set: function (a, b) {
        var c = n.makeArray(b);
        return n(a).find("option").each(function () {
            this.selected = n.inArray(n(this).val(), c) >= 0
        }), c.length || (a.selectedIndex = -1), c
    }}}, attrFn: {}, attr: function (a, b, c, d) {
        var e, f, g, h = a.nodeType;
        if (!a || h === 3 || h === 8 || h === 2)return;
        if (d && n.isFunction(n.fn[b]))return n(a)[b](c);
        if (typeof a.getAttribute == "undefined")return n.prop(a, b, c);
        g = h !== 1 || !n.isXMLDoc(a), g && (b = b.toLowerCase(), f = n.attrHooks[b] || (R.test(b) ? K : J));
        if (c !== undefined) {
            if (c === null) {
                n.removeAttr(a, b);
                return
            }
            return f && "set"in f && g && (e = f.set(a, c, b)) !== undefined ? e : (a.setAttribute(b, "" + c), c)
        }
        return f && "get"in f && g && (e = f.get(a, b)) !== null ? e : (e = a.getAttribute(b), e === null ? undefined : e)
    }, removeAttr: function (a, b) {
        var c, d, e, f, g = 0;
        if (b && a.nodeType === 1) {
            d = b.split(q);
            for (; g < d.length; g++)e = d[g], e && (c = n.propFix[e] || e, f = R.test(e), f || n.attr(a, e, ""), a.removeAttribute(S ? e : c), f && c in a && (a[c] = !1))
        }
    }, attrHooks: {type: {set: function (a, b) {
        if (O.test(a.nodeName) && a.parentNode)n.error("type property can't be changed"); else if (!n.support.radioValue && b === "radio" && n.nodeName(a, "input")) {
            var c = a.value;
            return a.setAttribute("type", b), c && (a.value = c), b
        }
    }}, value: {get: function (a, b) {
        return J && n.nodeName(a, "button") ? J.get(a, b) : b in a ? a.value : null
    }, set: function (a, b, c) {
        if (J && n.nodeName(a, "button"))return J.set(a, b, c);
        a.value = b
    }}}, propFix: {tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable"}, prop: function (a, b, c) {
        var d, e, f, g = a.nodeType;
        if (!a || g === 3 || g === 8 || g === 2)return;
        return f = g !== 1 || !n.isXMLDoc(a), f && (b = n.propFix[b] || b, e = n.propHooks[b]), c !== undefined ? e && "set"in e && (d = e.set(a, c, b)) !== undefined ? d : a[b] = c : e && "get"in e && (d = e.get(a, b)) !== null ? d : a[b]
    }, propHooks: {tabIndex: {get: function (a) {
        var b = a.getAttributeNode("tabindex");
        return b && b.specified ? parseInt(b.value, 10) : P.test(a.nodeName) || Q.test(a.nodeName) && a.href ? 0 : undefined
    }}}}), K = {get: function (a, b) {
        var c, d = n.prop(a, b);
        return d === !0 || typeof d != "boolean" && (c = a.getAttributeNode(b)) && c.nodeValue !== !1 ? b.toLowerCase() : undefined
    }, set: function (a, b, c) {
        var d;
        return b === !1 ? n.removeAttr(a, c) : (d = n.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())), c
    }}, S || (L = {name: !0, id: !0, coords: !0}, J = n.valHooks.button = {get: function (a, b) {
        var c;
        return c = a.getAttributeNode(b), c && (L[b] ? c.value !== "" : c.specified) ? c.value : undefined
    }, set: function (a, b, d) {
        var e = a.getAttributeNode(d);
        return e || (e = c.createAttribute(d), a.setAttributeNode(e)), e.value = b + ""
    }}, n.each(["width", "height"], function (a, b) {
        n.attrHooks[b] = n.extend(n.attrHooks[b], {set: function (a, c) {
            if (c === "")return a.setAttribute(b, "auto"), c
        }})
    }), n.attrHooks.contenteditable = {get: J.get, set: function (a, b, c) {
        b === "" && (b = "false"), J.set(a, b, c)
    }}), n.support.hrefNormalized || n.each(["href", "src", "width", "height"], function (a, b) {
        n.attrHooks[b] = n.extend(n.attrHooks[b], {get: function (a) {
            var c = a.getAttribute(b, 2);
            return c === null ? undefined : c
        }})
    }), n.support.style || (n.attrHooks.style = {get: function (a) {
        return a.style.cssText.toLowerCase() || undefined
    }, set: function (a, b) {
        return a.style.cssText = "" + b
    }}), n.support.optSelected || (n.propHooks.selected = n.extend(n.propHooks.selected, {get: function (a) {
        var b = a.parentNode;
        return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null
    }})), n.support.enctype || (n.propFix.enctype = "encoding"), n.support.checkOn || n.each(["radio", "checkbox"], function () {
        n.valHooks[this] = {get: function (a) {
            return a.getAttribute("value") === null ? "on" : a.value
        }}
    }), n.each(["radio", "checkbox"], function () {
        n.valHooks[this] = n.extend(n.valHooks[this], {set: function (a, b) {
            if (n.isArray(b))return a.checked = n.inArray(n(a).val(), b) >= 0
        }})
    });
    var T = /^(?:textarea|input|select)$/i, U = /^([^\.]*|)(?:\.(.+)|)$/, V = /(?:^|\s)hover(\.\S+|)\b/, W = /^key/, X = /^(?:mouse|contextmenu)|click/, Y = /^(?:focusinfocus|focusoutblur)$/, Z = function (a) {
        return n.event.special.hover ? a : a.replace(V, "mouseenter$1 mouseleave$1")
    };
    n.event = {add: function (a, b, c, d, e) {
        var f, g, h, i, j, k, l, m, o, p, q;
        if (a.nodeType === 3 || a.nodeType === 8 || !b || !c || !(f = n._data(a)))return;
        c.handler && (o = c, c = o.handler, e = o.selector), c.guid || (c.guid = n.guid++), h = f.events, h || (f.events = h = {}), g = f.handle, g || (f.handle = g = function (a) {
            return typeof n == "undefined" || !!a && n.event.triggered === a.type ? undefined : n.event.dispatch.apply(g.elem, arguments)
        }, g.elem = a), b = n.trim(Z(b)).split(" ");
        for (i = 0; i < b.length; i++) {
            j = U.exec(b[i]) || [], k = j[1], l = (j[2] || "").split(".").sort(), q = n.event.special[k] || {}, k = (e ? q.delegateType : q.bindType) || k, q = n.event.special[k] || {}, m = n.extend({type: k, origType: j[1], data: d, handler: c, guid: c.guid, selector: e, namespace: l.join(".")}, o), p = h[k];
            if (!p) {
                p = h[k] = [], p.delegateCount = 0;
                if (!q.setup || q.setup.call(a, d, l, g) === !1)a.addEventListener ? a.addEventListener(k, g, !1) : a.attachEvent && a.attachEvent("on" + k, g)
            }
            q.add && (q.add.call(a, m), m.handler.guid || (m.handler.guid = c.guid)), e ? p.splice(p.delegateCount++, 0, m) : p.push(m), n.event.global[k] = !0
        }
        a = null
    }, global: {}, remove: function (a, b, c, d, e) {
        var f, g, h, i, j, k, l, m, o, p, q, r = n.hasData(a) && n._data(a);
        if (!r || !(m = r.events))return;
        b = n.trim(Z(b || "")).split(" ");
        for (f = 0; f < b.length; f++) {
            g = U.exec(b[f]) || [], h = i = g[1], j = g[2];
            if (!h) {
                for (h in m)n.event.remove(a, h + b[f], c, d, !0);
                continue
            }
            o = n.event.special[h] || {}, h = (d ? o.delegateType : o.bindType) || h, p = m[h] || [], k = p.length, j = j ? new RegExp("(^|\\.)" + j.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
            for (l = 0; l < p.length; l++)q = p[l], (e || i === q.origType) && (!c || c.guid === q.guid) && (!j || j.test(q.namespace)) && (!d || d === q.selector || d === "**" && q.selector) && (p.splice(l--, 1), q.selector && p.delegateCount--, o.remove && o.remove.call(a, q));
            p.length === 0 && k !== p.length && ((!o.teardown || o.teardown.call(a, j, r.handle) === !1) && n.removeEvent(a, h, r.handle), delete m[h])
        }
        n.isEmptyObject(m) && (delete r.handle, n.removeData(a, "events", !0))
    }, customEvent: {getData: !0, setData: !0, changeData: !0}, trigger: function (a, b, d, e) {
        if (!d || d.nodeType !== 3 && d.nodeType !== 8) {
            var f, g, h, i, j, k, l, m, o, p, q = a.type || a, r = [];
            if (Y.test(q + n.event.triggered))return;
            q.indexOf("!") >= 0 && (q = q.slice(0, -1), g = !0), q.indexOf(".") >= 0 && (r = q.split("."), q = r.shift(), r.sort());
            if ((!d || n.event.customEvent[q]) && !n.event.global[q])return;
            a = typeof a == "object" ? a[n.expando] ? a : new n.Event(q, a) : new n.Event(q), a.type = q, a.isTrigger = !0, a.exclusive = g, a.namespace = r.join("."), a.namespace_re = a.namespace ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, k = q.indexOf(":") < 0 ? "on" + q : "";
            if (!d) {
                f = n.cache;
                for (h in f)f[h].events && f[h].events[q] && n.event.trigger(a, b, f[h].handle.elem, !0);
                return
            }
            a.result = undefined, a.target || (a.target = d), b = b != null ? n.makeArray(b) : [], b.unshift(a), l = n.event.special[q] || {};
            if (l.trigger && l.trigger.apply(d, b) === !1)return;
            o = [
                [d, l.bindType || q]
            ];
            if (!e && !l.noBubble && !n.isWindow(d)) {
                p = l.delegateType || q, i = Y.test(p + q) ? d : d.parentNode;
                for (j = d; i; i = i.parentNode)o.push([i, p]), j = i;
                j === (d.ownerDocument || c) && o.push([j.defaultView || j.parentWindow || window, p])
            }
            for (h = 0; h < o.length && !a.isPropagationStopped(); h++)i = o[h][0], a.type = o[h][1], m = (n._data(i, "events") || {})[a.type] && n._data(i, "handle"), m && m.apply(i, b), m = k && i[k], m && n.acceptData(i) && m.apply(i, b) === !1 && a.preventDefault();
            return a.type = q, !e && !a.isDefaultPrevented() && (!l._default || l._default.apply(d.ownerDocument, b) === !1) && (q !== "click" || !n.nodeName(d, "a")) && n.acceptData(d) && k && d[q] && (q !== "focus" && q !== "blur" || a.target.offsetWidth !== 0) && !n.isWindow(d) && (j = d[k], j && (d[k] = null), n.event.triggered = q, d[q](), n.event.triggered = undefined, j && (d[k] = j)), a.result
        }
        return
    }, dispatch: function (a) {
        a = n.event.fix(a || window.event);
        var b, c, d, e, f, g, h, i, j, k, l, m = (n._data(this, "events") || {})[a.type] || [], o = m.delegateCount, p = [].slice.call(arguments), q = !a.exclusive && !a.namespace, r = n.event.special[a.type] || {}, s = [];
        p[0] = a, a.delegateTarget = this;
        if (r.preDispatch && r.preDispatch.call(this, a) === !1)return;
        if (o && (!a.button || a.type !== "click")) {
            e = n(this), e.context = this;
            for (d = a.target; d != this; d = d.parentNode || this)if (d.disabled !== !0 || a.type !== "click") {
                g = {}, i = [], e[0] = d;
                for (b = 0; b < o; b++)j = m[b], k = j.selector, g[k] === undefined && (g[k] = e.is(k)), g[k] && i.push(j);
                i.length && s.push({elem: d, matches: i})
            }
        }
        m.length > o && s.push({elem: this, matches: m.slice(o)});
        for (b = 0; b < s.length && !a.isPropagationStopped(); b++) {
            h = s[b], a.currentTarget = h.elem;
            for (c = 0; c < h.matches.length && !a.isImmediatePropagationStopped(); c++) {
                j = h.matches[c];
                if (q || !a.namespace && !j.namespace || a.namespace_re && a.namespace_re.test(j.namespace))a.data = j.data, a.handleObj = j, f = ((n.event.special[j.origType] || {}).handle || j.handler).apply(h.elem, p), f !== undefined && (a.result = f, f === !1 && (a.preventDefault(), a.stopPropagation()))
            }
        }
        return r.postDispatch && r.postDispatch.call(this, a), a.result
    }, props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: {props: "char charCode key keyCode".split(" "), filter: function (a, b) {
        return a.which == null && (a.which = b.charCode != null ? b.charCode : b.keyCode), a
    }}, mouseHooks: {props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function (a, b) {
        var d, e, f, g = b.button, h = b.fromElement;
        return a.pageX == null && b.clientX != null && (d = a.target.ownerDocument || c, e = d.documentElement, f = d.body, a.pageX = b.clientX + (e && e.scrollLeft || f && f.scrollLeft || 0) - (e && e.clientLeft || f && f.clientLeft || 0), a.pageY = b.clientY + (e && e.scrollTop || f && f.scrollTop || 0) - (e && e.clientTop || f && f.clientTop || 0)), !a.relatedTarget && h && (a.relatedTarget = h === a.target ? b.toElement : h), !a.which && g !== undefined && (a.which = g & 1 ? 1 : g & 2 ? 3 : g & 4 ? 2 : 0), a
    }}, fix: function (a) {
        if (a[n.expando])return a;
        var b, d, e = a, f = n.event.fixHooks[a.type] || {}, g = f.props ? this.props.concat(f.props) : this.props;
        a = n.Event(e);
        for (b = g.length; b;)d = g[--b], a[d] = e[d];
        return a.target || (a.target = e.srcElement || c), a.target.nodeType === 3 && (a.target = a.target.parentNode), a.metaKey = !!a.metaKey, f.filter ? f.filter(a, e) : a
    }, special: {ready: {setup: n.bindReady}, load: {noBubble: !0}, focus: {delegateType: "focusin"}, blur: {delegateType: "focusout"}, beforeunload: {setup: function (a, b, c) {
        n.isWindow(this) && (this.onbeforeunload = c)
    }, teardown: function (a, b) {
        this.onbeforeunload === b && (this.onbeforeunload = null)
    }}}, simulate: function (a, b, c, d) {
        var e = n.extend(new n.Event, c, {type: a, isSimulated: !0, originalEvent: {}});
        d ? n.event.trigger(e, null, b) : n.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
    }}, n.event.handle = n.event.dispatch, n.removeEvent = c.removeEventListener ? function (a, b, c) {
        a.removeEventListener && a.removeEventListener(b, c, !1)
    } : function (a, b, c) {
        var d = "on" + b;
        a.detachEvent && (typeof a[d] == "undefined" && (a[d] = null), a.detachEvent(d, c))
    }, n.Event = function (a, b) {
        if (!(this instanceof n.Event))return new n.Event(a, b);
        a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? _ : $) : this.type = a, b && n.extend(this, b), this.timeStamp = a && a.timeStamp || n.now(), this[n.expando] = !0
    }, n.Event.prototype = {preventDefault: function () {
        this.isDefaultPrevented = _;
        var a = this.originalEvent;
        if (!a)return;
        a.preventDefault ? a.preventDefault() : a.returnValue = !1
    }, stopPropagation: function () {
        this.isPropagationStopped = _;
        var a = this.originalEvent;
        if (!a)return;
        a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0
    }, stopImmediatePropagation: function () {
        this.isImmediatePropagationStopped = _, this.stopPropagation()
    }, isDefaultPrevented: $, isPropagationStopped: $, isImmediatePropagationStopped: $}, n.each({mouseenter: "mouseover", mouseleave: "mouseout"}, function (a, b) {
        n.event.special[a] = {delegateType: b, bindType: b, handle: function (a) {
            var c, d = this, e = a.relatedTarget, f = a.handleObj, g = f.selector;
            if (!e || e !== d && !n.contains(d, e))a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b;
            return c
        }}
    }), n.support.submitBubbles || (n.event.special.submit = {setup: function () {
        if (n.nodeName(this, "form"))return!1;
        n.event.add(this, "click._submit keypress._submit", function (a) {
            var b = a.target, c = n.nodeName(b, "input") || n.nodeName(b, "button") ? b.form : undefined;
            c && !n._data(c, "_submit_attached") && (n.event.add(c, "submit._submit", function (a) {
                a._submit_bubble = !0
            }), n._data(c, "_submit_attached", !0))
        })
    }, postDispatch: function (a) {
        a._submit_bubble && (delete a._submit_bubble, this.parentNode && !a.isTrigger && n.event.simulate("submit", this.parentNode, a, !0))
    }, teardown: function () {
        if (n.nodeName(this, "form"))return!1;
        n.event.remove(this, "._submit")
    }}), n.support.changeBubbles || (n.event.special.change = {setup: function () {
        if (T.test(this.nodeName)) {
            if (this.type === "checkbox" || this.type === "radio")n.event.add(this, "propertychange._change", function (a) {
                a.originalEvent.propertyName === "checked" && (this._just_changed = !0)
            }), n.event.add(this, "click._change", function (a) {
                this._just_changed && !a.isTrigger && (this._just_changed = !1), n.event.simulate("change", this, a, !0)
            });
            return!1
        }
        n.event.add(this, "beforeactivate._change", function (a) {
            var b = a.target;
            T.test(b.nodeName) && !n._data(b, "_change_attached") && (n.event.add(b, "change._change", function (a) {
                this.parentNode && !a.isSimulated && !a.isTrigger && n.event.simulate("change", this.parentNode, a, !0)
            }), n._data(b, "_change_attached", !0))
        })
    }, handle: function (a) {
        var b = a.target;
        if (this !== b || a.isSimulated || a.isTrigger || b.type !== "radio" && b.type !== "checkbox")return a.handleObj.handler.apply(this, arguments)
    }, teardown: function () {
        return n.event.remove(this, "._change"), T.test(this.nodeName)
    }}), n.support.focusinBubbles || n.each({focus: "focusin", blur: "focusout"}, function (a, b) {
        var d = 0, e = function (a) {
            n.event.simulate(b, a.target, n.event.fix(a), !0)
        };
        n.event.special[b] = {setup: function () {
            d++ === 0 && c.addEventListener(a, e, !0)
        }, teardown: function () {
            --d === 0 && c.removeEventListener(a, e, !0)
        }}
    }), n.fn.extend({on: function (a, b, c, d, e) {
        var f, g;
        if (typeof a == "object") {
            typeof b != "string" && (c = c || b, b = undefined);
            for (g in a)this.on(g, b, c, a[g], e);
            return this
        }
        c == null && d == null ? (d = b, c = b = undefined) : d == null && (typeof b == "string" ? (d = c, c = undefined) : (d = c, c = b, b = undefined));
        if (d === !1)d = $; else if (!d)return this;
        return e === 1 && (f = d, d = function (a) {
            return n().off(a), f.apply(this, arguments)
        }, d.guid = f.guid || (f.guid = n.guid++)), this.each(function () {
            n.event.add(this, a, d, c, b)
        })
    }, one: function (a, b, c, d) {
        return this.on(a, b, c, d, 1)
    }, off: function (a, b, c) {
        var d, e;
        if (a && a.preventDefault && a.handleObj)return d = a.handleObj, n(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;
        if (typeof a == "object") {
            for (e in a)this.off(e, b, a[e]);
            return this
        }
        if (b === !1 || typeof b == "function")c = b, b = undefined;
        return c === !1 && (c = $), this.each(function () {
            n.event.remove(this, a, c, b)
        })
    }, bind: function (a, b, c) {
        return this.on(a, null, b, c)
    }, unbind: function (a, b) {
        return this.off(a, null, b)
    }, live: function (a, b, c) {
        return n(this.context).on(a, this.selector, b, c), this
    }, die: function (a, b) {
        return n(this.context).off(a, this.selector || "**", b), this
    }, delegate: function (a, b, c, d) {
        return this.on(b, a, c, d)
    }, undelegate: function (a, b, c) {
        return arguments.length == 1 ? this.off(a, "**") : this.off(b, a || "**", c)
    }, trigger: function (a, b) {
        return this.each(function () {
            n.event.trigger(a, b, this)
        })
    }, triggerHandler: function (a, b) {
        if (this[0])return n.event.trigger(a, b, this[0], !0)
    }, toggle: function (a) {
        var b = arguments, c = a.guid || n.guid++, d = 0, e = function (c) {
            var e = (n._data(this, "lastToggle" + a.guid) || 0) % d;
            return n._data(this, "lastToggle" + a.guid, e + 1), c.preventDefault(), b[e].apply(this, arguments) || !1
        };
        e.guid = c;
        while (d < b.length)b[d++].guid = c;
        return this.click(e)
    }, hover: function (a, b) {
        return this.mouseenter(a).mouseleave(b || a)
    }}), n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) {
        n.fn[b] = function (a, c) {
            return c == null && (c = a, a = null), arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
        }, W.test(b) && (n.event.fixHooks[b] = n.event.keyHooks), X.test(b) && (n.event.fixHooks[b] = n.event.mouseHooks)
    }), function (a, b) {
        function db(a, b, c, d) {
            var e = 0, f = b.length;
            for (; e < f; e++)Z(a, b[e], c, d)
        }

        function eb(a, b, c, d, e, f) {
            var g, h = $.setFilters[b.toLowerCase()];
            return h || Z.error(b), (a || !(g = e)) && db(a || "*", d, g = [], e), g.length > 0 ? h(g, c, f) : []
        }

        function fb(a, c, d, e, f) {
            var g, h, i, j, k, l, m, n, o = 0, q = f.length, s = L.POS, t = new RegExp("^" + s.source + "(?!" + r + ")", "i"), u = function () {
                var a = 1, c = arguments.length - 2;
                for (; a < c; a++)arguments[a] === b && (g[a] = b)
            };
            for (; o < q; o++) {
                s.exec(""), a = f[o], j = [], i = 0, k = e;
                while (g = s.exec(a)) {
                    n = s.lastIndex = g.index + g[0].length;
                    if (n > i) {
                        m = a.slice(i, g.index), i = n, l = [c], B.test(m) && (k && (l = k), k = e);
                        if (h = H.test(m))m = m.slice(0, -5).replace(B, "$&*");
                        g.length > 1 && g[0].replace(t, u), k = eb(m, g[1], g[2], l, k, h)
                    }
                }
                k ? (j = j.concat(k), (m = a.slice(i)) && m !== ")" ? B.test(m) ? db(m, j, d, e) : Z(m, c, d, e ? e.concat(k) : k) : p.apply(d, j)) : Z(a, c, d, e)
            }
            return q === 1 ? d : Z.uniqueSort(d)
        }

        function gb(a, b, c) {
            var d, e, f, g = [], i = 0, j = D.exec(a), k = !j.pop() && !j.pop(), l = k && a.match(C) || [""], m = $.preFilter, n = $.filter, o = !c && b !== h;
            for (; (e = l[i]) != null && k; i++) {
                g.push(d = []), o && (e = " " + e);
                while (e) {
                    k = !1;
                    if (j = B.exec(e))e = e.slice(j[0].length), k = d.push({part: j.pop().replace(A, " "), captures: j});
                    for (f in n)(j = L[f].exec(e)) && (!m[f] || (j = m[f](j, b, c))) && (e = e.slice(j.shift().length), k = d.push({part: f, captures: j}));
                    if (!k)break
                }
            }
            return k || Z.error(a), g
        }

        function hb(a, b, e) {
            var f = b.dir, g = m++;
            return a || (a = function (a) {
                return a === e
            }), b.first ? function (b, c) {
                while (b = b[f])if (b.nodeType === 1)return a(b, c) && b
            } : function (b, e) {
                var h, i = g + "." + d, j = i + "." + c;
                while (b = b[f])if (b.nodeType === 1) {
                    if ((h = b[q]) === j)return b.sizset;
                    if (typeof h == "string" && h.indexOf(i) === 0) {
                        if (b.sizset)return b
                    } else {
                        b[q] = j;
                        if (a(b, e))return b.sizset = !0, b;
                        b.sizset = !1
                    }
                }
            }
        }

        function ib(a, b) {
            return a ? function (c, d) {
                var e = b(c, d);
                return e && a(e === !0 ? c : e, d)
            } : b
        }

        function jb(a, b, c) {
            var d, e, f = 0;
            for (; d = a[f]; f++)$.relative[d.part] ? e = hb(e, $.relative[d.part], b) : (d.captures.push(b, c), e = ib(e, $.filter[d.part].apply(null, d.captures)));
            return e
        }

        function kb(a) {
            return function (b, c) {
                var d, e = 0;
                for (; d = a[e]; e++)if (d(b, c))return!0;
                return!1
            }
        }

        var c, d, e, f, g, h = a.document, i = h.documentElement, j = "undefined", k = !1, l = !0, m = 0, o = [].slice, p = [].push, q = ("sizcache" + Math.random()).replace(".", ""), r = "[\\x20\\t\\r\\n\\f]", s = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", t = s.replace("w", "w#"), u = "([*^$|!~]?=)", v = "\\[" + r + "*(" + s + ")" + r + "*(?:" + u + r + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + t + ")|)|)" + r + "*\\]", w = ":(" + s + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", x = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", y = r + "*([\\x20\\t\\r\\n\\f>+~])" + r + "*", z = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + v + "|" + w.replace(2, 7) + "|[^\\\\(),])+", A = new RegExp("^" + r + "+|((?:^|[^\\\\])(?:\\\\.)*)" + r + "+$", "g"), B = new RegExp("^" + y), C = new RegExp(z + "?(?=" + r + "*,|$)", "g"), D = new RegExp("^(?:(?!,)(?:(?:^|,)" + r + "*" + z + ")*?|" + r + "*(.*?))(\\)|$)"), E = new RegExp(z.slice(19, -6) + "\\x20\\t\\r\\n\\f>+~])+|" + y, "g"), F = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, G = /[\x20\t\r\n\f]*[+~]/, H = /:not\($/, I = /h\d/i, J = /input|select|textarea|button/i, K = /\\(?!\\)/g, L = {ID: new RegExp("^#(" + s + ")"), CLASS: new RegExp("^\\.(" + s + ")"), NAME: new RegExp("^\\[name=['\"]?(" + s + ")['\"]?\\]"), TAG: new RegExp("^(" + s.replace("[-", "[-\\*") + ")"), ATTR: new RegExp("^" + v), PSEUDO: new RegExp("^" + w), CHILD: new RegExp("^:(only|nth|last|first)-child(?:\\(" + r + "*(even|odd|(([+-]|)(\\d*)n|)" + r + "*(?:([+-]|)" + r + "*(\\d+)|))" + r + "*\\)|)", "i"), POS: new RegExp(x, "ig"), needsContext: new RegExp("^" + r + "*[>+~]|" + x, "i")}, M = {}, N = [], O = {}, P = [], Q = function (a) {
            return a.sizzleFilter = !0, a
        }, R = function (a) {
            return function (b) {
                return b.nodeName.toLowerCase() === "input" && b.type === a
            }
        }, S = function (a) {
            return function (b) {
                var c = b.nodeName.toLowerCase();
                return(c === "input" || c === "button") && b.type === a
            }
        }, T = function (a) {
            var b = !1, c = h.createElement("div");
            try {
                b = a(c)
            } catch (d) {
            }
            return c = null, b
        }, U = T(function (a) {
            a.innerHTML = "<select></select>";
            var b = typeof a.lastChild.getAttribute("multiple");
            return b !== "boolean" && b !== "string"
        }), V = T(function (a) {
            a.id = q + 0, a.innerHTML = "<a name='" + q + "'></a><div name='" + q + "'></div>", i.insertBefore(a, i.firstChild);
            var b = h.getElementsByName && h.getElementsByName(q).length === 2 + h.getElementsByName(q + 0).length;
            return g = !h.getElementById(q), i.removeChild(a), b
        }), W = T(function (a) {
            return a.appendChild(h.createComment("")), a.getElementsByTagName("*").length === 0
        }), X = T(function (a) {
            return a.innerHTML = "<a href='#'></a>", a.firstChild && typeof a.firstChild.getAttribute !== j && a.firstChild.getAttribute("href") === "#"
        }), Y = T(function (a) {
            return a.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>", !a.getElementsByClassName || a.getElementsByClassName("e").length === 0 ? !1 : (a.lastChild.className = "e", a.getElementsByClassName("e").length !== 1)
        }), Z = function (a, b, c, d) {
            c = c || [], b = b || h;
            var e, f, g, i, j = b.nodeType;
            if (j !== 1 && j !== 9)return[];
            if (!a || typeof a != "string")return c;
            g = ab(b);
            if (!g && !d)if (e = F.exec(a))if (i = e[1]) {
                if (j === 9) {
                    f = b.getElementById(i);
                    if (!f || !f.parentNode)return c;
                    if (f.id === i)return c.push(f), c
                } else if (b.ownerDocument && (f = b.ownerDocument.getElementById(i)) && bb(b, f) && f.id === i)return c.push(f), c
            } else {
                if (e[2])return p.apply(c, o.call(b.getElementsByTagName(a), 0)), c;
                if ((i = e[3]) && Y && b.getElementsByClassName)return p.apply(c, o.call(b.getElementsByClassName(i), 0)), c
            }
            return mb(a, b, c, d, g)
        }, $ = Z.selectors = {cacheLength: 50, match: L, order: ["ID", "TAG"], attrHandle: {}, createPseudo: Q, find: {ID: g ? function (a, b, c) {
            if (typeof b.getElementById !== j && !c) {
                var d = b.getElementById(a);
                return d && d.parentNode ? [d] : []
            }
        } : function (a, c, d) {
            if (typeof c.getElementById !== j && !d) {
                var e = c.getElementById(a);
                return e ? e.id === a || typeof e.getAttributeNode !== j && e.getAttributeNode("id").value === a ? [e] : b : []
            }
        }, TAG: W ? function (a, b) {
            if (typeof b.getElementsByTagName !== j)return b.getElementsByTagName(a)
        } : function (a, b) {
            var c = b.getElementsByTagName(a);
            if (a === "*") {
                var d, e = [], f = 0;
                for (; d = c[f]; f++)d.nodeType === 1 && e.push(d);
                return e
            }
            return c
        }}, relative: {">": {dir: "parentNode", first: !0}, " ": {dir: "parentNode"}, "+": {dir: "previousSibling", first: !0}, "~": {dir: "previousSibling"}}, preFilter: {ATTR: function (a) {
            return a[1] = a[1].replace(K, ""), a[3] = (a[4] || a[5] || "").replace(K, ""), a[2] === "~=" && (a[3] = " " + a[3] + " "), a.slice(0, 4)
        }, CHILD: function (a) {
            return a[1] = a[1].toLowerCase(), a[1] === "nth" ? (a[2] || Z.error(a[0]), a[3] = +(a[3] ? a[4] + (a[5] || 1) : 2 * (a[2] === "even" || a[2] === "odd")), a[4] = +(a[6] + a[7] || a[2] === "odd")) : a[2] && Z.error(a[0]), a
        }, PSEUDO: function (a) {
            var b, c = a[4];
            return L.CHILD.test(a[0]) ? null : (c && (b = D.exec(c)) && b.pop() && (a[0] = a[0].slice(0, b[0].length - c.length - 1), c = b[0].slice(0, -1)), a.splice(2, 3, c || a[3]), a)
        }}, filter: {ID: g ? function (a) {
            return a = a.replace(K, ""), function (b) {
                return b.getAttribute("id") === a
            }
        } : function (a) {
            return a = a.replace(K, ""), function (b) {
                var c = typeof b.getAttributeNode !== j && b.getAttributeNode("id");
                return c && c.value === a
            }
        }, TAG: function (a) {
            return a === "*" ? function () {
                return!0
            } : (a = a.replace(K, "").toLowerCase(), function (b) {
                return b.nodeName && b.nodeName.toLowerCase() === a
            })
        }, CLASS: function (a) {
            var b = M[a];
            return b || (b = M[a] = new RegExp("(^|" + r + ")" + a + "(" + r + "|$)"), N.push(a), N.length > $.cacheLength && delete M[N.shift()]), function (a) {
                return b.test(a.className || typeof a.getAttribute !== j && a.getAttribute("class") || "")
            }
        }, ATTR: function (a, b, c) {
            return b ? function (d) {
                var e = Z.attr(d, a), f = e + "";
                if (e == null)return b === "!=";
                switch (b) {
                    case"=":
                        return f === c;
                    case"!=":
                        return f !== c;
                    case"^=":
                        return c && f.indexOf(c) === 0;
                    case"*=":
                        return c && f.indexOf(c) > -1;
                    case"$=":
                        return c && f.substr(f.length - c.length) === c;
                    case"~=":
                        return(" " + f + " ").indexOf(c) > -1;
                    case"|=":
                        return f === c || f.substr(0, c.length + 1) === c + "-"
                }
            } : function (b) {
                return Z.attr(b, a) != null
            }
        }, CHILD: function (a, b, c, d) {
            if (a === "nth") {
                var e = m++;
                return function (a) {
                    var b, f, g = 0, h = a;
                    if (c === 1 && d === 0)return!0;
                    b = a.parentNode;
                    if (b && (b[q] !== e || !a.sizset)) {
                        for (h = b.firstChild; h; h = h.nextSibling)if (h.nodeType === 1) {
                            h.sizset = ++g;
                            if (h === a)break
                        }
                        b[q] = e
                    }
                    return f = a.sizset - d, c === 0 ? f === 0 : f % c === 0 && f / c >= 0
                }
            }
            return function (b) {
                var c = b;
                switch (a) {
                    case"only":
                    case"first":
                        while (c = c.previousSibling)if (c.nodeType === 1)return!1;
                        if (a === "first")return!0;
                        c = b;
                    case"last":
                        while (c = c.nextSibling)if (c.nodeType === 1)return!1;
                        return!0
                }
            }
        }, PSEUDO: function (a, b, c, d) {
            var e = $.pseudos[a] || $.pseudos[a.toLowerCase()];
            return e || Z.error("unsupported pseudo: " + a), e.sizzleFilter ? e(b, c, d) : e
        }}, pseudos: {not: Q(function (a, b, c) {
            var d = lb(a.replace(A, "$1"), b, c);
            return function (a) {
                return!d(a)
            }
        }), enabled: function (a) {
            return a.disabled === !1
        }, disabled: function (a) {
            return a.disabled === !0
        }, checked: function (a) {
            var b = a.nodeName.toLowerCase();
            return b === "input" && !!a.checked || b === "option" && !!a.selected
        }, selected: function (a) {
            return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
        }, parent: function (a) {
            return!$.pseudos.empty(a)
        }, empty: function (a) {
            var b;
            a = a.firstChild;
            while (a) {
                if (a.nodeName > "@" || (b = a.nodeType) === 3 || b === 4)return!1;
                a = a.nextSibling
            }
            return!0
        }, contains: Q(function (a) {
            return function (b) {
                return(b.textContent || b.innerText || cb(b)).indexOf(a) > -1
            }
        }), has: Q(function (a) {
            return function (b) {
                return Z(a, b).length > 0
            }
        }), header: function (a) {
            return I.test(a.nodeName)
        }, text: function (a) {
            var b, c;
            return a.nodeName.toLowerCase() === "input" && (b = a.type) === "text" && ((c = a.getAttribute("type")) == null || c.toLowerCase() === b)
        }, radio: R("radio"), checkbox: R("checkbox"), file: R("file"), password: R("password"), image: R("image"), submit: S("submit"), reset: S("reset"), button: function (a) {
            var b = a.nodeName.toLowerCase();
            return b === "input" && a.type === "button" || b === "button"
        }, input: function (a) {
            return J.test(a.nodeName)
        }, focus: function (a) {
            var b = a.ownerDocument;
            return a === b.activeElement && (!b.hasFocus || b.hasFocus()) && (!!a.type || !!a.href)
        }, active: function (a) {
            return a === a.ownerDocument.activeElement
        }}, setFilters: {first: function (a, b, c) {
            return c ? a.slice(1) : [a[0]]
        }, last: function (a, b, c) {
            var d = a.pop();
            return c ? a : [d]
        }, even: function (a, b, c) {
            var d = [], e = c ? 1 : 0, f = a.length;
            for (; e < f; e += 2)d.push(a[e]);
            return d
        }, odd: function (a, b, c) {
            var d = [], e = c ? 0 : 1, f = a.length;
            for (; e < f; e += 2)d.push(a[e]);
            return d
        }, lt: function (a, b, c) {
            return c ? a.slice(+b) : a.slice(0, +b)
        }, gt: function (a, b, c) {
            return c ? a.slice(0, +b + 1) : a.slice(+b + 1)
        }, eq: function (a, b, c) {
            var d = a.splice(+b, 1);
            return c ? a : d
        }}};
        $.setFilters.nth = $.setFilters.eq, $.filters = $.pseudos, X || ($.attrHandle = {href: function (a) {
            return a.getAttribute("href", 2)
        }, type: function (a) {
            return a.getAttribute("type")
        }}), V && ($.order.push("NAME"), $.find.NAME = function (a, b) {
            if (typeof b.getElementsByName !== j)return b.getElementsByName(a)
        }), Y && ($.order.splice(1, 0, "CLASS"), $.find.CLASS = function (a, b, c) {
            if (typeof b.getElementsByClassName !== j && !c)return b.getElementsByClassName(a)
        });
        try {
            o.call(i.childNodes, 0)[0].nodeType
        } catch (_) {
            o = function (a) {
                var b, c = [];
                for (; b = this[a]; a++)c.push(b);
                return c
            }
        }
        var ab = Z.isXML = function (a) {
            var b = a && (a.ownerDocument || a).documentElement;
            return b ? b.nodeName !== "HTML" : !1
        }, bb = Z.contains = i.compareDocumentPosition ? function (a, b) {
            return!!(a.compareDocumentPosition(b) & 16)
        } : i.contains ? function (a, b) {
            var c = a.nodeType === 9 ? a.documentElement : a, d = b.parentNode;
            return a === d || !!(d && d.nodeType === 1 && c.contains && c.contains(d))
        } : function (a, b) {
            while (b = b.parentNode)if (b === a)return!0;
            return!1
        }, cb = Z.getText = function (a) {
            var b, c = "", d = 0, e = a.nodeType;
            if (e) {
                if (e === 1 || e === 9 || e === 11) {
                    if (typeof a.textContent == "string")return a.textContent;
                    for (a = a.firstChild; a; a = a.nextSibling)c += cb(a)
                } else if (e === 3 || e === 4)return a.nodeValue
            } else for (; b = a[d]; d++)c += cb(b);
            return c
        };
        Z.attr = function (a, b) {
            var c, d = ab(a);
            return d || (b = b.toLowerCase()), $.attrHandle[b] ? $.attrHandle[b](a) : U || d ? a.getAttribute(b) : (c = a.getAttributeNode(b), c ? typeof a[b] == "boolean" ? a[b] ? b : null : c.specified ? c.value : null : null)
        }, Z.error = function (a) {
            throw new Error("Syntax error, unrecognized expression: " + a)
        }, [0, 0].sort(function () {
            return l = 0
        }), i.compareDocumentPosition ? e = function (a, b) {
            return a === b ? (k = !0, 0) : (!a.compareDocumentPosition || !b.compareDocumentPosition ? a.compareDocumentPosition : a.compareDocumentPosition(b) & 4) ? -1 : 1
        } : (e = function (a, b) {
            if (a === b)return k = !0, 0;
            if (a.sourceIndex && b.sourceIndex)return a.sourceIndex - b.sourceIndex;
            var c, d, e = [], g = [], h = a.parentNode, i = b.parentNode, j = h;
            if (h === i)return f(a, b);
            if (!h)return-1;
            if (!i)return 1;
            while (j)e.unshift(j), j = j.parentNode;
            j = i;
            while (j)g.unshift(j), j = j.parentNode;
            c = e.length, d = g.length;
            for (var l = 0; l < c && l < d; l++)if (e[l] !== g[l])return f(e[l], g[l]);
            return l === c ? f(a, g[l], -1) : f(e[l], b, 1)
        }, f = function (a, b, c) {
            if (a === b)return c;
            var d = a.nextSibling;
            while (d) {
                if (d === b)return-1;
                d = d.nextSibling
            }
            return 1
        }), Z.uniqueSort = function (a) {
            var b, c = 1;
            if (e) {
                k = l, a.sort(e);
                if (k)for (; b = a[c]; c++)b === a[c - 1] && a.splice(c--, 1)
            }
            return a
        };
        var lb = Z.compile = function (a, b, c) {
            var d, e, f, g = O[a];
            if (g && g.context === b)return g;
            e = gb(a, b, c);
            for (f = 0; d = e[f]; f++)e[f] = jb(d, b, c);
            return g = O[a] = kb(e), g.context = b, g.runs = g.dirruns = 0, P.push(a), P.length > $.cacheLength && delete O[P.shift()], g
        };
        Z.matches = function (a, b) {
            return Z(a, null, null, b)
        }, Z.matchesSelector = function (a, b) {
            return Z(b, null, null, [a]).length > 0
        };
        var mb = function (a, b, e, f, g) {
            a = a.replace(A, "$1");
            var h, i, j, k, l, m, n, q, r, s = a.match(C), t = a.match(E), u = b.nodeType;
            if (L.POS.test(a))return fb(a, b, e, f, s);
            if (f)h = o.call(f, 0); else if (s && s.length === 1) {
                if (t.length > 1 && u === 9 && !g && (s = L.ID.exec(t[0]))) {
                    b = $.find.ID(s[1], b, g)[0];
                    if (!b)return e;
                    a = a.slice(t.shift().length)
                }
                q = (s = G.exec(t[0])) && !s.index && b.parentNode || b, r = t.pop(), m = r.split(":not")[0];
                for (j = 0, k = $.order.length; j < k; j++) {
                    n = $.order[j];
                    if (s = L[n].exec(m)) {
                        h = $.find[n]((s[1] || "").replace(K, ""), q, g);
                        if (h == null)continue;
                        m === r && (a = a.slice(0, a.length - r.length) + m.replace(L[n], ""), a || p.apply(e, o.call(h, 0)));
                        break
                    }
                }
            }
            if (a) {
                i = lb(a, b, g), d = i.dirruns++, h == null && (h = $.find.TAG("*", G.test(a) && b.parentNode || b));
                for (j = 0; l = h[j]; j++)c = i.runs++, i(l, b) && e.push(l)
            }
            return e
        };
        h.querySelectorAll && function () {
            var a, b = mb, c = /'|\\/g, d = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, e = [], f = [":active"], g = i.matchesSelector || i.mozMatchesSelector || i.webkitMatchesSelector || i.oMatchesSelector || i.msMatchesSelector;
            T(function (a) {
                a.innerHTML = "<select><option selected></option></select>", a.querySelectorAll("[selected]").length || e.push("\\[" + r + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), a.querySelectorAll(":checked").length || e.push(":checked")
            }), T(function (a) {
                a.innerHTML = "<p test=''></p>", a.querySelectorAll("[test^='']").length && e.push("[*^$]=" + r + "*(?:\"\"|'')"), a.innerHTML = "<input type='hidden'>", a.querySelectorAll(":enabled").length || e.push(":enabled", ":disabled")
            }), e = e.length && new RegExp(e.join("|")), mb = function (a, d, f, g, h) {
                if (!g && !h && (!e || !e.test(a)))if (d.nodeType === 9)try {
                    return p.apply(f, o.call(d.querySelectorAll(a), 0)), f
                } catch (i) {
                } else if (d.nodeType === 1 && d.nodeName.toLowerCase() !== "object") {
                    var j = d.getAttribute("id"), k = j || q, l = G.test(a) && d.parentNode || d;
                    j ? k = k.replace(c, "\\$&") : d.setAttribute("id", k);
                    try {
                        return p.apply(f, o.call(l.querySelectorAll(a.replace(C, "[id='" + k + "'] $&")), 0)), f
                    } catch (i) {
                    } finally {
                        j || d.removeAttribute("id")
                    }
                }
                return b(a, d, f, g, h)
            }, g && (T(function (b) {
                a = g.call(b, "div");
                try {
                    g.call(b, "[test!='']:sizzle"), f.push($.match.PSEUDO)
                } catch (c) {
                }
            }), f = new RegExp(f.join("|")), Z.matchesSelector = function (b, c) {
                c = c.replace(d, "='$1']");
                if (!ab(b) && !f.test(c) && (!e || !e.test(c)))try {
                    var h = g.call(b, c);
                    if (h || a || b.document && b.document.nodeType !== 11)return h
                } catch (i) {
                }
                return Z(c, null, null, [b]).length > 0
            })
        }(), Z.attr = n.attr, n.find = Z, n.expr = Z.selectors, n.expr[":"] = n.expr.pseudos, n.unique = Z.uniqueSort, n.text = Z.getText, n.isXMLDoc = Z.isXML, n.contains = Z.contains
    }(window);
    var ab = /Until$/, bb = /^(?:parents|prev(?:Until|All))/, cb = /^.[^:#\[\.,]*$/, db = n.expr.match.needsContext, eb = {children: !0, contents: !0, next: !0, prev: !0};
    n.fn.extend({find: function (a) {
        var b, c, d, e, f, g, h = this;
        if (typeof a != "string")return n(a).filter(function () {
            for (b = 0, c = h.length; b < c; b++)if (n.contains(h[b], this))return!0
        });
        g = this.pushStack("", "find", a);
        for (b = 0, c = this.length; b < c; b++) {
            d = g.length, n.find(a, this[b], g);
            if (b > 0)for (e = d; e < g.length; e++)for (f = 0; f < d; f++)if (g[f] === g[e]) {
                g.splice(e--, 1);
                break
            }
        }
        return g
    }, has: function (a) {
        var b, c = n(a, this), d = c.length;
        return this.filter(function () {
            for (b = 0; b < d; b++)if (n.contains(this, c[b]))return!0
        })
    }, not: function (a) {
        return this.pushStack(hb(this, a, !1), "not", a)
    }, filter: function (a) {
        return this.pushStack(hb(this, a, !0), "filter", a)
    }, is: function (a) {
        return!!a && (typeof a == "string" ? db.test(a) ? n(a, this.context).index(this[0]) >= 0 : n.filter(a, this).length > 0 : this.filter(a).length > 0)
    }, closest: function (a, b) {
        var c, d = 0, e = this.length, f = [], g = db.test(a) || typeof a != "string" ? n(a, b || this.context) : 0;
        for (; d < e; d++) {
            c = this[d];
            while (c && c.ownerDocument && c !== b && c.nodeType !== 11) {
                if (g ? g.index(c) > -1 : n.find.matchesSelector(c, a)) {
                    f.push(c);
                    break
                }
                c = c.parentNode
            }
        }
        return f = f.length > 1 ? n.unique(f) : f, this.pushStack(f, "closest", a)
    }, index: function (a) {
        return a ? typeof a == "string" ? n.inArray(this[0], n(a)) : n.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.prevAll().length : -1
    }, add: function (a, b) {
        var c = typeof a == "string" ? n(a, b) : n.makeArray(a && a.nodeType ? [a] : a), d = n.merge(this.get(), c);
        return this.pushStack(fb(c[0]) || fb(d[0]) ? d : n.unique(d))
    }, addBack: function (a) {
        return this.add(a == null ? this.prevObject : this.prevObject.filter(a))
    }}), n.fn.andSelf = n.fn.addBack, n.each({parent: function (a) {
        var b = a.parentNode;
        return b && b.nodeType !== 11 ? b : null
    }, parents: function (a) {
        return n.dir(a, "parentNode")
    }, parentsUntil: function (a, b, c) {
        return n.dir(a, "parentNode", c)
    }, next: function (a) {
        return gb(a, "nextSibling")
    }, prev: function (a) {
        return gb(a, "previousSibling")
    }, nextAll: function (a) {
        return n.dir(a, "nextSibling")
    }, prevAll: function (a) {
        return n.dir(a, "previousSibling")
    }, nextUntil: function (a, b, c) {
        return n.dir(a, "nextSibling", c)
    }, prevUntil: function (a, b, c) {
        return n.dir(a, "previousSibling", c)
    }, siblings: function (a) {
        return n.sibling((a.parentNode || {}).firstChild, a)
    }, children: function (a) {
        return n.sibling(a.firstChild)
    }, contents: function (a) {
        return n.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : n.merge([], a.childNodes)
    }}, function (a, b) {
        n.fn[a] = function (c, d) {
            var e = n.map(this, b, c);
            return ab.test(a) || (d = c), d && typeof d == "string" && (e = n.filter(d, e)), e = this.length > 1 && !eb[a] ? n.unique(e) : e, this.length > 1 && bb.test(a) && (e = e.reverse()), this.pushStack(e, a, i.call(arguments).join(","))
        }
    }), n.extend({filter: function (a, b, c) {
        return c && (a = ":not(" + a + ")"), b.length === 1 ? n.find.matchesSelector(b[0], a) ? [b[0]] : [] : n.find.matches(a, b)
    }, dir: function (a, b, c) {
        var d = [], e = a[b];
        while (e && e.nodeType !== 9 && (c === undefined || e.nodeType !== 1 || !n(e).is(c)))e.nodeType === 1 && d.push(e), e = e[b];
        return d
    }, sibling: function (a, b) {
        var c = [];
        for (; a; a = a.nextSibling)a.nodeType === 1 && a !== b && c.push(a);
        return c
    }});
    var jb = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", kb = / jQuery\d+="(?:null|\d+)"/g, lb = /^\s+/, mb = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, nb = /<([\w:]+)/, ob = /<tbody/i, pb = /<|&#?\w+;/, qb = /<(?:script|style|link)/i, rb = /<(?:script|object|embed|option|style)/i, sb = new RegExp("<(?:" + jb + ")[\\s/>]", "i"), tb = /^(?:checkbox|radio)$/, ub = /checked\s*(?:[^=]|=\s*.checked.)/i, vb = /\/(java|ecma)script/i, wb = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g, xb = {option: [1, "<select multiple='multiple'>", "</select>"], legend: [1, "<fieldset>", "</fieldset>"], thead: [1, "<table>", "</table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], area: [1, "<map>", "</map>"], _default: [0, "", ""]}, yb = ib(c), zb = yb.appendChild(c.createElement("div"));
    xb.optgroup = xb.option, xb.tbody = xb.tfoot = xb.colgroup = xb.caption = xb.thead, xb.th = xb.td, n.support.htmlSerialize || (xb._default = [1, "X<div>", "</div>"]), n.fn.extend({text: function (a) {
        return n.access(this, function (a) {
            return a === undefined ? n.text(this) : this.empty().append((this[0] && this[0].ownerDocument || c).createTextNode(a))
        }, null, a, arguments.length)
    }, wrapAll: function (a) {
        if (n.isFunction(a))return this.each(function (b) {
            n(this).wrapAll(a.call(this, b))
        });
        if (this[0]) {
            var b = n(a, this[0].ownerDocument).eq(0).clone(!0);
            this[0].parentNode && b.insertBefore(this[0]), b.map(function () {
                var a = this;
                while (a.firstChild && a.firstChild.nodeType === 1)a = a.firstChild;
                return a
            }).append(this)
        }
        return this
    }, wrapInner: function (a) {
        return n.isFunction(a) ? this.each(function (b) {
            n(this).wrapInner(a.call(this, b))
        }) : this.each(function () {
            var b = n(this), c = b.contents();
            c.length ? c.wrapAll(a) : b.append(a)
        })
    }, wrap: function (a) {
        var b = n.isFunction(a);
        return this.each(function (c) {
            n(this).wrapAll(b ? a.call(this, c) : a)
        })
    }, unwrap: function () {
        return this.parent().each(function () {
            n.nodeName(this, "body") || n(this).replaceWith(this.childNodes)
        }).end()
    }, append: function () {
        return this.domManip(arguments, !0, function (a) {
            (this.nodeType === 1 || this.nodeType === 11) && this.appendChild(a)
        })
    }, prepend: function () {
        return this.domManip(arguments, !0, function (a) {
            (this.nodeType === 1 || this.nodeType === 11) && this.insertBefore(a, this.firstChild)
        })
    }, before: function () {
        if (!fb(this[0]))return this.domManip(arguments, !1, function (a) {
            this.parentNode.insertBefore(a, this)
        });
        if (arguments.length) {
            var a = n.clean(arguments);
            return this.pushStack(n.merge(a, this), "before", this.selector)
        }
    }, after: function () {
        if (!fb(this[0]))return this.domManip(arguments, !1, function (a) {
            this.parentNode.insertBefore(a, this.nextSibling)
        });
        if (arguments.length) {
            var a = n.clean(arguments);
            return this.pushStack(n.merge(this, a), "after", this.selector)
        }
    }, remove: function (a, b) {
        var c, d = 0;
        for (; (c = this[d]) != null; d++)if (!a || n.filter(a, [c]).length)!b && c.nodeType === 1 && (n.cleanData(c.getElementsByTagName("*")), n.cleanData([c])), c.parentNode && c.parentNode.removeChild(c);
        return this
    }, empty: function () {
        var a, b = 0;
        for (; (a = this[b]) != null; b++) {
            a.nodeType === 1 && n.cleanData(a.getElementsByTagName("*"));
            while (a.firstChild)a.removeChild(a.firstChild)
        }
        return this
    }, clone: function (a, b) {
        return a = a == null ? !1 : a, b = b == null ? a : b, this.map(function () {
            return n.clone(this, a, b)
        })
    }, html: function (a) {
        return n.access(this, function (a) {
            var b = this[0] || {}, c = 0, d = this.length;
            if (a === undefined)return b.nodeType === 1 ? b.innerHTML.replace(kb, "") : undefined;
            if (typeof a == "string" && !qb.test(a) && (n.support.htmlSerialize || !sb.test(a)) && (n.support.leadingWhitespace || !lb.test(a)) && !xb[(nb.exec(a) || ["", ""])[1].toLowerCase()]) {
                a = a.replace(mb, "<$1></$2>");
                try {
                    for (; c < d; c++)b = this[c] || {}, b.nodeType === 1 && (n.cleanData(b.getElementsByTagName("*")), b.innerHTML = a);
                    b = 0
                } catch (e) {
                }
            }
            b && this.empty().append(a)
        }, null, a, arguments.length)
    }, replaceWith: function (a) {
        return fb(this[0]) ? this.length ? this.pushStack(n(n.isFunction(a) ? a() : a), "replaceWith", a) : this : n.isFunction(a) ? this.each(function (b) {
            var c = n(this), d = c.html();
            c.replaceWith(a.call(this, b, d))
        }) : (typeof a != "string" && (a = n(a).detach()), this.each(function () {
            var b = this.nextSibling, c = this.parentNode;
            n(this).remove(), b ? n(b).before(a) : n(c).append(a)
        }))
    }, detach: function (a) {
        return this.remove(a, !0)
    }, domManip: function (a, b, c) {
        a = [].concat.apply([], a);
        var d, e, f, g, h = 0, i = a[0], j = [], k = this.length;
        if (!n.support.checkClone && k > 1 && typeof i == "string" && ub.test(i))return this.each(function () {
            n(this).domManip(a, b, c)
        });
        if (n.isFunction(i))return this.each(function (d) {
            var e = n(this);
            a[0] = i.call(this, d, b ? e.html() : undefined), e.domManip(a, b, c)
        });
        if (this[0]) {
            d = n.buildFragment(a, this, j), f = d.fragment, e = f.firstChild, f.childNodes.length === 1 && (f = e);
            if (e) {
                b = b && n.nodeName(e, "tr");
                for (g = d.cacheable || k - 1; h < k; h++)c.call(b && n.nodeName(this[h], "table") ? Ab(this[h], "tbody") : this[h], h === g ? f : n.clone(f, !0, !0))
            }
            f = e = null, j.length && n.each(j, function (a, b) {
                b.src ? n.ajax ? n.ajax({url: b.src, type: "GET", dataType: "script", async: !1, global: !1, "throws": !0}) : n.error("no ajax") : n.globalEval((b.text || b.textContent || b.innerHTML || "").replace(wb, "")), b.parentNode && b.parentNode.removeChild(b)
            })
        }
        return this
    }}), n.buildFragment = function (a, b, d) {
        var e, f, g, h = a[0];
        return b = b || c, b = (b[0] || b).ownerDocument || b[0] || b, typeof b.createDocumentFragment == "undefined" && (b = c), a.length === 1 && typeof h == "string" && h.length < 512 && b === c && h.charAt(0) === "<" && !rb.test(h) && (n.support.checkClone || !ub.test(h)) && (n.support.html5Clone || !sb.test(h)) && (f = !0, e = n.fragments[h], g = e !== undefined), e || (e = b.createDocumentFragment(), n.clean(a, b, e, d), f && (n.fragments[h] = g && e)), {fragment: e, cacheable: f}
    }, n.fragments = {}, n.each({appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith"}, function (a, b) {
        n.fn[a] = function (c) {
            var d, e = 0, f = [], g = n(c), h = g.length, i = this.length === 1 && this[0].parentNode;
            if ((i == null || i && i.nodeType === 11 && i.childNodes.length === 1) && h === 1)return g[b](this[0]), this;
            for (; e < h; e++)d = (e > 0 ? this.clone(!0) : this).get(), n(g[e])[b](d), f = f.concat(d);
            return this.pushStack(f, a, g.selector)
        }
    }), n.extend({clone: function (a, b, c) {
        var d, e, f, g;
        n.support.html5Clone || n.isXMLDoc(a) || !sb.test("<" + a.nodeName + ">") ? g = a.cloneNode(!0) : (zb.innerHTML = a.outerHTML, zb.removeChild(g = zb.firstChild));
        if ((!n.support.noCloneEvent || !n.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !n.isXMLDoc(a)) {
            Cb(a, g), d = Db(a), e = Db(g);
            for (f = 0; d[f]; ++f)e[f] && Cb(d[f], e[f])
        }
        if (b) {
            Bb(a, g);
            if (c) {
                d = Db(a), e = Db(g);
                for (f = 0; d[f]; ++f)Bb(d[f], e[f])
            }
        }
        return d = e = null, g
    }, clean: function (a, b, d, e) {
        var f, g, h, i, j, k, l, m, o, p, q, r, s = 0, t = [];
        if (!b || typeof b.createDocumentFragment == "undefined")b = c;
        for (g = b === c && yb; (h = a[s]) != null; s++) {
            typeof h == "number" && (h += "");
            if (!h)continue;
            if (typeof h == "string")if (!pb.test(h))h = b.createTextNode(h); else {
                g = g || ib(b), l = l || g.appendChild(b.createElement("div")), h = h.replace(mb, "<$1></$2>"), i = (nb.exec(h) || ["", ""])[1].toLowerCase(), j = xb[i] || xb._default, k = j[0], l.innerHTML = j[1] + h + j[2];
                while (k--)l = l.lastChild;
                if (!n.support.tbody) {
                    m = ob.test(h), o = i === "table" && !m ? l.firstChild && l.firstChild.childNodes : j[1] === "<table>" && !m ? l.childNodes : [];
                    for (f = o.length - 1; f >= 0; --f)n.nodeName(o[f], "tbody") && !o[f].childNodes.length && o[f].parentNode.removeChild(o[f])
                }
                !n.support.leadingWhitespace && lb.test(h) && l.insertBefore(b.createTextNode(lb.exec(h)[0]), l.firstChild), h = l.childNodes, l = g.lastChild
            }
            h.nodeType ? t.push(h) : t = n.merge(t, h)
        }
        l && (g.removeChild(l), h = l = g = null);
        if (!n.support.appendChecked)for (s = 0; (h = t[s]) != null; s++)n.nodeName(h, "input") ? Eb(h) : typeof h.getElementsByTagName != "undefined" && n.grep(h.getElementsByTagName("input"), Eb);
        if (d) {
            q = function (a) {
                if (!a.type || vb.test(a.type))return e ? e.push(a.parentNode ? a.parentNode.removeChild(a) : a) : d.appendChild(a)
            };
            for (s = 0; (h = t[s]) != null; s++)if (!n.nodeName(h, "script") || !q(h))d.appendChild(h), typeof h.getElementsByTagName != "undefined" && (r = n.grep(n.merge([], h.getElementsByTagName("script")), q), t.splice.apply(t, [s + 1, 0].concat(r)), s += r.length)
        }
        return t
    }, cleanData: function (a, b) {
        var c, d, e, f, g = 0, h = n.expando, i = n.cache, j = n.support.deleteExpando, k = n.event.special;
        for (; (e = a[g]) != null; g++)if (b || n.acceptData(e)) {
            d = e[h], c = d && i[d];
            if (c) {
                if (c.events)for (f in c.events)k[f] ? n.event.remove(e, f) : n.removeEvent(e, f, c.handle);
                i[d] && (delete i[d], j ? delete e[h] : e.removeAttribute ? e.removeAttribute(h) : e[h] = null, n.deletedIds.push(d))
            }
        }
    }}), function () {
        var a, b;
        n.uaMatch = function (a) {
            a = a.toLowerCase();
            var b = /(chrome)[ \/]([\w.]+)/.exec(a) || /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || a.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a) || [];
            return{browser: b[1] || "", version: b[2] || "0"}
        }, a = n.uaMatch(e.userAgent), b = {}, a.browser && (b[a.browser] = !0, b.version = a.version), b.webkit && (b.safari = !0), n.browser = b, n.sub = function () {
            function a(b, c) {
                return new a.fn.init(b, c)
            }

            n.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function (d, e) {
                return e && e instanceof n && !(e instanceof a) && (e = a(e)), n.fn.init.call(this, d, e, b)
            }, a.fn.init.prototype = a.fn;
            var b = a(c);
            return a
        }
    }();
    var Fb, Gb, Hb, Ib = /alpha\([^)]*\)/i, Jb = /opacity=([^)]*)/, Kb = /^(top|right|bottom|left)$/, Lb = /^margin/, Mb = new RegExp("^(" + o + ")(.*)$", "i"), Nb = new RegExp("^(" + o + ")(?!px)[a-z%]+$", "i"), Ob = new RegExp("^([-+])=(" + o + ")", "i"), Pb = {}, Qb = {position: "absolute", visibility: "hidden", display: "block"}, Rb = {letterSpacing: 0, fontWeight: 400, lineHeight: 1}, Sb = ["Top", "Right", "Bottom", "Left"], Tb = ["Webkit", "O", "Moz", "ms"], Ub = n.fn.toggle;
    n.fn.extend({css: function (a, b) {
        return n.access(this, function (a, b, c) {
            return c !== undefined ? n.style(a, b, c) : n.css(a, b)
        }, a, b, arguments.length > 1)
    }, show: function () {
        return Xb(this, !0)
    }, hide: function () {
        return Xb(this)
    }, toggle: function (a, b) {
        var c = typeof a == "boolean";
        return n.isFunction(a) && n.isFunction(b) ? Ub.apply(this, arguments) : this.each(function () {
            (c ? a : Wb(this)) ? n(this).show() : n(this).hide()
        })
    }}), n.extend({cssHooks: {opacity: {get: function (a, b) {
        if (b) {
            var c = Fb(a, "opacity");
            return c === "" ? "1" : c
        }
    }}}, cssNumber: {fillOpacity: !0, fontWeight: !0, lineHeight: !0, opacity: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0}, cssProps: {"float": n.support.cssFloat ? "cssFloat" : "styleFloat"}, style: function (a, b, c, d) {
        if (!a || a.nodeType === 3 || a.nodeType === 8 || !a.style)return;
        var e, f, g, h = n.camelCase(b), i = a.style;
        b = n.cssProps[h] || (n.cssProps[h] = Vb(i, h)), g = n.cssHooks[b] || n.cssHooks[h];
        if (c === undefined)return g && "get"in g && (e = g.get(a, !1, d)) !== undefined ? e : i[b];
        f = typeof c, f === "string" && (e = Ob.exec(c)) && (c = (e[1] + 1) * e[2] + parseFloat(n.css(a, b)), f = "number");
        if (c == null || f === "number" && isNaN(c))return;
        f === "number" && !n.cssNumber[h] && (c += "px");
        if (!g || !("set"in g) || (c = g.set(a, c, d)) !== undefined)try {
            i[b] = c
        } catch (j) {
        }
    }, css: function (a, b, c, d) {
        var e, f, g, h = n.camelCase(b);
        return b = n.cssProps[h] || (n.cssProps[h] = Vb(a.style, h)), g = n.cssHooks[b] || n.cssHooks[h], g && "get"in g && (e = g.get(a, !0, d)), e === undefined && (e = Fb(a, b)), e === "normal" && b in Rb && (e = Rb[b]), c || d !== undefined ? (f = parseFloat(e), c || n.isNumeric(f) ? f || 0 : e) : e
    }, swap: function (a, b, c) {
        var d, e, f = {};
        for (e in b)f[e] = a.style[e], a.style[e] = b[e];
        d = c.call(a);
        for (e in b)a.style[e] = f[e];
        return d
    }}), window.getComputedStyle ? Fb = function (a, b) {
        var c, d, e, f, g = getComputedStyle(a, null), h = a.style;
        return g && (c = g[b], c === "" && !n.contains(a.ownerDocument.documentElement, a) && (c = n.style(a, b)), Nb.test(c) && Lb.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = c, c = g.width, h.width = d, h.minWidth = e, h.maxWidth = f)), c
    } : c.documentElement.currentStyle && (Fb = function (a, b) {
        var c, d, e = a.currentStyle && a.currentStyle[b], f = a.style;
        return e == null && f && f[b] && (e = f[b]), Nb.test(e) && !Kb.test(b) && (c = f.left, d = a.runtimeStyle && a.runtimeStyle.left, d && (a.runtimeStyle.left = a.currentStyle.left), f.left = b === "fontSize" ? "1em" : e, e = f.pixelLeft + "px", f.left = c, d && (a.runtimeStyle.left = d)), e === "" ? "auto" : e
    }), n.each(["height", "width"], function (a, b) {
        n.cssHooks[b] = {get: function (a, c, d) {
            if (c)return a.offsetWidth !== 0 || Fb(a, "display") !== "none" ? $b(a, b, d) : n.swap(a, Qb, function () {
                return $b(a, b, d)
            })
        }, set: function (a, c, d) {
            return Yb(a, c, d ? Zb(a, b, d, n.support.boxSizing && n.css(a, "boxSizing") === "border-box") : 0)
        }}
    }), n.support.opacity || (n.cssHooks.opacity = {get: function (a, b) {
        return Jb.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : b ? "1" : ""
    }, set: function (a, b) {
        var c = a.style, d = a.currentStyle, e = n.isNumeric(b) ? "alpha(opacity=" + b * 100 + ")" : "", f = d && d.filter || c.filter || "";
        c.zoom = 1;
        if (b >= 1 && n.trim(f.replace(Ib, "")) === "" && c.removeAttribute) {
            c.removeAttribute("filter");
            if (d && !d.filter)return
        }
        c.filter = Ib.test(f) ? f.replace(Ib, e) : f + " " + e
    }}), n(function () {
        n.support.reliableMarginRight || (n.cssHooks.marginRight = {get: function (a, b) {
            return n.swap(a, {display: "inline-block"}, function () {
                if (b)return Fb(a, "marginRight")
            })
        }}), !n.support.pixelPosition && n.fn.position && n.each(["top", "left"], function (a, b) {
            n.cssHooks[b] = {get: function (a, c) {
                if (c) {
                    var d = Fb(a, b);
                    return Nb.test(d) ? n(a).position()[b] + "px" : d
                }
            }}
        })
    }), n.expr && n.expr.filters && (n.expr.filters.hidden = function (a) {
        return a.offsetWidth === 0 && a.offsetHeight === 0 || !n.support.reliableHiddenOffsets && (a.style && a.style.display || Fb(a, "display")) === "none"
    }, n.expr.filters.visible = function (a) {
        return!n.expr.filters.hidden(a)
    }), n.each({margin: "", padding: "", border: "Width"}, function (a, b) {
        n.cssHooks[a + b] = {expand: function (c) {
            var d, e = typeof c == "string" ? c.split(" ") : [c], f = {};
            for (d = 0; d < 4; d++)f[a + Sb[d] + b] = e[d] || e[d - 2] || e[0];
            return f
        }}, Lb.test(a) || (n.cssHooks[a + b].set = Yb)
    });
    var ac = /%20/g, bc = /\[\]$/, cc = /\r?\n/g, dc = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, ec = /^(?:select|textarea)/i;
    n.fn.extend({serialize: function () {
        return n.param(this.serializeArray())
    }, serializeArray: function () {
        return this.map(function () {
            return this.elements ? n.makeArray(this.elements) : this
        }).filter(function () {
            return this.name && !this.disabled && (this.checked || ec.test(this.nodeName) || dc.test(this.type))
        }).map(function (a, b) {
            var c = n(this).val();
            return c == null ? null : n.isArray(c) ? n.map(c, function (a, c) {
                return{name: b.name, value: a.replace(cc, "\r\n")}
            }) : {name: b.name, value: c.replace(cc, "\r\n")}
        }).get()
    }}), n.param = function (a, b) {
        var c, d = [], e = function (a, b) {
            b = n.isFunction(b) ? b() : b == null ? "" : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
        };
        b === undefined && (b = n.ajaxSettings && n.ajaxSettings.traditional);
        if (n.isArray(a) || a.jquery && !n.isPlainObject(a))n.each(a, function () {
            e(this.name, this.value)
        }); else for (c in a)fc(c, a[c], b, e);
        return d.join("&").replace(ac, "+")
    };
    var gc, hc, ic = /#.*$/, jc = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, kc = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, lc = /^(?:GET|HEAD)$/, mc = /^\/\//, nc = /\?/, oc = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, pc = /([?&])_=[^&]*/, qc = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, rc = n.fn.load, sc = {}, tc = {}, uc = ["*/"] + ["*"];
    try {
        gc = d.href
    } catch (vc) {
        gc = c.createElement("a"), gc.href = "", gc = gc.href
    }
    hc = qc.exec(gc.toLowerCase()) || [], n.fn.load = function (a, b, c) {
        if (typeof a != "string" && rc)return rc.apply(this, arguments);
        if (!this.length)return this;
        var d, e, f, g = this, h = a.indexOf(" ");
        return h >= 0 && (d = a.slice(h, a.length), a = a.slice(0, h)), n.isFunction(b) ? (c = b, b = undefined) : typeof b == "object" && (e = "POST"), n.ajax({url: a, type: e, dataType: "html", data: b, complete: function (a, b) {
            c && g.each(c, f || [a.responseText, b, a])
        }}).done(function (a) {
            f = arguments, g.html(d ? n("<div>").append(a.replace(oc, "")).find(d) : a)
        }), this
    }, n.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (a, b) {
        n.fn[b] = function (a) {
            return this.on(b, a)
        }
    }), n.each(["get", "post"], function (a, b) {
        n[b] = function (a, c, d, e) {
            return n.isFunction(c) && (e = e || d, d = c, c = undefined), n.ajax({type: b, url: a, data: c, success: d, dataType: e})
        }
    }), n.extend({getScript: function (a, b) {
        return n.get(a, undefined, b, "script")
    }, getJSON: function (a, b, c) {
        return n.get(a, b, c, "json")
    }, ajaxSetup: function (a, b) {
        return b ? yc(a, n.ajaxSettings) : (b = a, a = n.ajaxSettings), yc(a, b), a
    }, ajaxSettings: {url: gc, isLocal: kc.test(hc[1]), global: !0, type: "GET", contentType: "application/x-www-form-urlencoded; charset=UTF-8", processData: !0, async: !0, accepts: {xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": uc}, contents: {xml: /xml/, html: /html/, json: /json/}, responseFields: {xml: "responseXML", text: "responseText"}, converters: {"* text": window.String, "text html": !0, "text json": n.parseJSON, "text xml": n.parseXML}, flatOptions: {context: !0, url: !0}}, ajaxPrefilter: wc(sc), ajaxTransport: wc(tc), ajax: function (a, b) {
        function x(a, b, e, h) {
            var j, q, s, t, v, x = b;
            if (u === 2)return;
            u = 2, g && clearTimeout(g), f = undefined, d = h || "", w.readyState = a > 0 ? 4 : 0, e && (t = zc(k, w, e));
            if (a >= 200 && a < 300 || a === 304)k.ifModified && (v = w.getResponseHeader("Last-Modified"), v && (n.lastModified[c] = v), v = w.getResponseHeader("Etag"), v && (n.etag[c] = v)), a === 304 ? (x = "notmodified", j = !0) : (j = Ac(k, t), x = j.state, q = j.data, s = j.error, j = !s); else {
                s = x;
                if (!x || a)x = "error", a < 0 && (a = 0)
            }
            w.status = a, w.statusText = "" + (b || x), j ? o.resolveWith(l, [q, x, w]) : o.rejectWith(l, [w, x, s]), w.statusCode(r), r = undefined, i && m.trigger("ajax" + (j ? "Success" : "Error"), [w, k, j ? q : s]), p.fireWith(l, [w, x]), i && (m.trigger("ajaxComplete", [w, k]), --n.active || n.event.trigger("ajaxStop"))
        }

        typeof a == "object" && (b = a, a = undefined), b = b || {};
        var c, d, e, f, g, h, i, j, k = n.ajaxSetup({}, b), l = k.context || k, m = l !== k && (l.nodeType || l instanceof n) ? n(l) : n.event, o = n.Deferred(), p = n.Callbacks("once memory"), r = k.statusCode || {}, s = {}, t = {}, u = 0, v = "canceled", w = {readyState: 0, setRequestHeader: function (a, b) {
            if (!u) {
                var c = a.toLowerCase();
                a = t[c] = t[c] || a, s[a] = b
            }
            return this
        }, getAllResponseHeaders: function () {
            return u === 2 ? d : null
        }, getResponseHeader: function (a) {
            var b;
            if (u === 2) {
                if (!e) {
                    e = {};
                    while (b = jc.exec(d))e[b[1].toLowerCase()] = b[2]
                }
                b = e[a.toLowerCase()]
            }
            return b === undefined ? null : b
        }, overrideMimeType: function (a) {
            return u || (k.mimeType = a), this
        }, abort: function (a) {
            return a = a || v, f && f.abort(a), x(0, a), this
        }};
        o.promise(w), w.success = w.done, w.error = w.fail, w.complete = p.add, w.statusCode = function (a) {
            if (a) {
                var b;
                if (u < 2)for (b in a)r[b] = [r[b], a[b]]; else b = a[w.status], w.always(b)
            }
            return this
        }, k.url = ((a || k.url) + "").replace(ic, "").replace(mc, hc[1] + "//"), k.dataTypes = n.trim(k.dataType || "*").toLowerCase().split(q), k.crossDomain == null && (h = qc.exec(k.url.toLowerCase()), k.crossDomain = !(!h || h[1] == hc[1] && h[2] == hc[2] && (h[3] || (h[1] === "http:" ? 80 : 443)) == (hc[3] || (hc[1] === "http:" ? 80 : 443)))), k.data && k.processData && typeof k.data != "string" && (k.data = n.param(k.data, k.traditional)), xc(sc, k, b, w);
        if (u === 2)return w;
        i = k.global, k.type = k.type.toUpperCase(), k.hasContent = !lc.test(k.type), i && n.active++ === 0 && n.event.trigger("ajaxStart");
        if (!k.hasContent) {
            k.data && (k.url += (nc.test(k.url) ? "&" : "?") + k.data, delete k.data), c = k.url;
            if (k.cache === !1) {
                var y = n.now(), z = k.url.replace(pc, "$1_=" + y);
                k.url = z + (z === k.url ? (nc.test(k.url) ? "&" : "?") + "_=" + y : "")
            }
        }
        (k.data && k.hasContent && k.contentType !== !1 || b.contentType) && w.setRequestHeader("Content-Type", k.contentType), k.ifModified && (c = c || k.url, n.lastModified[c] && w.setRequestHeader("If-Modified-Since", n.lastModified[c]), n.etag[c] && w.setRequestHeader("If-None-Match", n.etag[c])), w.setRequestHeader("Accept", k.dataTypes[0] && k.accepts[k.dataTypes[0]] ? k.accepts[k.dataTypes[0]] + (k.dataTypes[0] !== "*" ? ", " + uc + "; q=0.01" : "") : k.accepts["*"]);
        for (j in k.headers)w.setRequestHeader(j, k.headers[j]);
        if (!k.beforeSend || k.beforeSend.call(l, w, k) !== !1 && u !== 2) {
            v = "abort";
            for (j in{success: 1, error: 1, complete: 1})w[j](k[j]);
            f = xc(tc, k, b, w);
            if (!f)x(-1, "No Transport"); else {
                w.readyState = 1, i && m.trigger("ajaxSend", [w, k]), k.async && k.timeout > 0 && (g = setTimeout(function () {
                    w.abort("timeout")
                }, k.timeout));
                try {
                    u = 1, f.send(s, x)
                } catch (A) {
                    if (!(u < 2))throw A;
                    x(-1, A)
                }
            }
            return w
        }
        return w.abort()
    }, active: 0, lastModified: {}, etag: {}});
    var Bc = [], Cc = /\?/, Dc = /(=)\?(?=&|$)|\?\?/, Ec = n.now();
    n.ajaxSetup({jsonp: "callback", jsonpCallback: function () {
        var a = Bc.pop() || n.expando + "_" + Ec++;
        return this[a] = !0, a
    }}), n.ajaxPrefilter("json jsonp", function (a, b, c) {
        var d, e, f, g = a.data, h = a.url, i = a.jsonp !== !1, j = i && Dc.test(h), k = i && !j && typeof g == "string" && !(a.contentType || "").indexOf("application/x-www-form-urlencoded") && Dc.test(g);
        if (a.dataTypes[0] === "jsonp" || j || k)return d = a.jsonpCallback = n.isFunction(a.jsonpCallback) ? a.jsonpCallback() : a.jsonpCallback, e = window[d], j ? a.url = h.replace(Dc, "$1" + d) : k ? a.data = g.replace(Dc, "$1" + d) : i && (a.url += (Cc.test(h) ? "&" : "?") + a.jsonp + "=" + d), a.converters["script json"] = function () {
            return f || n.error(d + " was not called"), f[0]
        }, a.dataTypes[0] = "json", window[d] = function () {
            f = arguments
        }, c.always(function () {
            window[d] = e, a[d] && (a.jsonpCallback = b.jsonpCallback, Bc.push(d)), f && n.isFunction(e) && e(f[0]), f = e = undefined
        }), "script"
    }), n.ajaxSetup({accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents: {script: /javascript|ecmascript/}, converters: {"text script": function (a) {
        return n.globalEval(a), a
    }}}), n.ajaxPrefilter("script", function (a) {
        a.cache === undefined && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
    }), n.ajaxTransport("script", function (a) {
        if (a.crossDomain) {
            var b, d = c.head || c.getElementsByTagName("head")[0] || c.documentElement;
            return{send: function (e, f) {
                b = c.createElement("script"), b.async = "async", a.scriptCharset && (b.charset = a.scriptCharset), b.src = a.url, b.onload = b.onreadystatechange = function (a, c) {
                    if (c || !b.readyState || /loaded|complete/.test(b.readyState))b.onload = b.onreadystatechange = null, d && b.parentNode && d.removeChild(b), b = undefined, c || f(200, "success")
                }, d.insertBefore(b, d.firstChild)
            }, abort: function () {
                b && b.onload(0, 1)
            }}
        }
    });
    var Fc, Gc = window.ActiveXObject ? function () {
        for (var a in Fc)Fc[a](0, 1)
    } : !1, Hc = 0;
    n.ajaxSettings.xhr = window.ActiveXObject ? function () {
        return!this.isLocal && Ic() || Jc()
    } : Ic, function (a) {
        n.extend(n.support, {ajax: !!a, cors: !!a && "withCredentials"in a})
    }(n.ajaxSettings.xhr()), n.support.ajax && n.ajaxTransport(function (a) {
        if (!a.crossDomain || n.support.cors) {
            var b;
            return{send: function (c, d) {
                var e, f, g = a.xhr();
                a.username ? g.open(a.type, a.url, a.async, a.username, a.password) : g.open(a.type, a.url, a.async);
                if (a.xhrFields)for (f in a.xhrFields)g[f] = a.xhrFields[f];
                a.mimeType && g.overrideMimeType && g.overrideMimeType(a.mimeType), !a.crossDomain && !c["X-Requested-With"] && (c["X-Requested-With"] = "XMLHttpRequest");
                try {
                    for (f in c)g.setRequestHeader(f, c[f])
                } catch (h) {
                }
                g.send(a.hasContent && a.data || null), b = function (c, f) {
                    var h, i, j, k, l;
                    try {
                        if (b && (f || g.readyState === 4)) {
                            b = undefined, e && (g.onreadystatechange = n.noop, Gc && delete Fc[e]);
                            if (f)g.readyState !== 4 && g.abort(); else {
                                h = g.status, j = g.getAllResponseHeaders(), k = {}, l = g.responseXML, l && l.documentElement && (k.xml = l);
                                try {
                                    k.text = g.responseText
                                } catch (c) {
                                }
                                try {
                                    i = g.statusText
                                } catch (m) {
                                    i = ""
                                }
                                !h && a.isLocal && !a.crossDomain ? h = k.text ? 200 : 404 : h === 1223 && (h = 204)
                            }
                        }
                    } catch (o) {
                        f || d(-1, o)
                    }
                    k && d(h, i, k, j)
                }, a.async ? g.readyState === 4 ? setTimeout(b, 0) : (e = ++Hc, Gc && (Fc || (Fc = {}, n(window).unload(Gc)), Fc[e] = b), g.onreadystatechange = b) : b()
            }, abort: function () {
                b && b(0, 1)
            }}
        }
    });
    var Kc, Lc, Mc = /^(?:toggle|show|hide)$/, Nc = new RegExp("^(?:([-+])=|)(" + o + ")([a-z%]*)$", "i"), Oc = /queueHooks$/, Pc = [Vc], Qc = {"*": [function (a, b) {
        var c, d, e, f = this.createTween(a, b), g = Nc.exec(b), h = f.cur(), i = +h || 0, j = 1;
        if (g) {
            c = +g[2], d = g[3] || (n.cssNumber[a] ? "" : "px");
            if (d !== "px" && i) {
                i = n.css(f.elem, a, !0) || c || 1;
                do e = j = j || ".5", i /= j, n.style(f.elem, a, i + d), j = f.cur() / h; while (j !== 1 && j !== e)
            }
            f.unit = d, f.start = i, f.end = g[1] ? i + (g[1] + 1) * c : c
        }
        return f
    }]};
    n.Animation = n.extend(Tc, {tweener: function (a, b) {
        n.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" ");
        var c, d = 0, e = a.length;
        for (; d < e; d++)c = a[d], Qc[c] = Qc[c] || [], Qc[c].unshift(b)
    }, prefilter: function (a, b) {
        b ? Pc.unshift(a) : Pc.push(a)
    }}), n.Tween = Wc, Wc.prototype = {constructor: Wc, init: function (a, b, c, d, e, f) {
        this.elem = a, this.prop = c, this.easing = e || "swing", this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (n.cssNumber[c] ? "" : "px")
    }, cur: function () {
        var a = Wc.propHooks[this.prop];
        return a && a.get ? a.get(this) : Wc.propHooks._default.get(this)
    }, run: function (a) {
        var b, c = Wc.propHooks[this.prop];
        return this.pos = b = n.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration), this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : Wc.propHooks._default.set(this), this
    }}, Wc.prototype.init.prototype = Wc.prototype, Wc.propHooks = {_default: {get: function (a) {
        var b;
        return a.elem[a.prop] == null || !!a.elem.style && a.elem.style[a.prop] != null ? (b = n.css(a.elem, a.prop, !1, ""), !b || b === "auto" ? 0 : b) : a.elem[a.prop]
    }, set: function (a) {
        n.fx.step[a.prop] ? n.fx.step[a.prop](a) : a.elem.style && (a.elem.style[n.cssProps[a.prop]] != null || n.cssHooks[a.prop]) ? n.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now
    }}}, Wc.propHooks.scrollTop = Wc.propHooks.scrollLeft = {set: function (a) {
        a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now)
    }}, n.each(["toggle", "show", "hide"], function (a, b) {
        var c = n.fn[b];
        n.fn[b] = function (d, e, f) {
            return d == null || typeof d == "boolean" || !a && n.isFunction(d) && n.isFunction(e) ? c.apply(this, arguments) : this.animate(Xc(b, !0), d, e, f)
        }
    }), n.fn.extend({fadeTo: function (a, b, c, d) {
        return this.filter(Wb).css("opacity", 0).show().end().animate({opacity: b}, a, c, d)
    }, animate: function (a, b, c, d) {
        var e = n.isEmptyObject(a), f = n.speed(b, c, d), g = function () {
            var b = Tc(this, n.extend({}, a), f);
            e && b.stop(!0)
        };
        return e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g)
    }, stop: function (a, b, c) {
        var d = function (a) {
            var b = a.stop;
            delete a.stop, b(c)
        };
        return typeof a != "string" && (c = b, b = a, a = undefined), b && a !== !1 && this.queue(a || "fx", []), this.each(function () {
            var b = !0, e = a != null && a + "queueHooks", f = n.timers, g = n._data(this);
            if (e)g[e] && g[e].stop && d(g[e]); else for (e in g)g[e] && g[e].stop && Oc.test(e) && d(g[e]);
            for (e = f.length; e--;)f[e].elem === this && (a == null || f[e].queue === a) && (f[e].anim.stop(c), b = !1, f.splice(e, 1));
            (b || !c) && n.dequeue(this, a)
        })
    }}), n.each({slideDown: Xc("show"), slideUp: Xc("hide"), slideToggle: Xc("toggle"), fadeIn: {opacity: "show"}, fadeOut: {opacity: "hide"}, fadeToggle: {opacity: "toggle"}}, function (a, b) {
        n.fn[a] = function (a, c, d) {
            return this.animate(b, a, c, d)
        }
    }), n.speed = function (a, b, c) {
        var d = a && typeof a == "object" ? n.extend({}, a) : {complete: c || !c && b || n.isFunction(a) && a, duration: a, easing: c && b || b && !n.isFunction(b) && b};
        d.duration = n.fx.off ? 0 : typeof d.duration == "number" ? d.duration : d.duration in n.fx.speeds ? n.fx.speeds[d.duration] : n.fx.speeds._default;
        if (d.queue == null || d.queue === !0)d.queue = "fx";
        return d.old = d.complete, d.complete = function () {
            n.isFunction(d.old) && d.old.call(this), d.queue && n.dequeue(this, d.queue)
        }, d
    }, n.easing = {linear: function (a) {
        return a
    }, swing: function (a) {
        return.5 - Math.cos(a * Math.PI) / 2
    }}, n.timers = [], n.fx = Wc.prototype.init, n.fx.tick = function () {
        var a, b = n.timers, c = 0;
        for (; c < b.length; c++)a = b[c], !a() && b[c] === a && b.splice(c--, 1);
        b.length || n.fx.stop()
    }, n.fx.timer = function (a) {
        a() && n.timers.push(a) && !Lc && (Lc = setInterval(n.fx.tick, n.fx.interval))
    }, n.fx.interval = 13, n.fx.stop = function () {
        clearInterval(Lc), Lc = null
    }, n.fx.speeds = {slow: 600, fast: 200, _default: 400}, n.fx.step = {}, n.expr && n.expr.filters && (n.expr.filters.animated = function (a) {
        return n.grep(n.timers, function (b) {
            return a === b.elem
        }).length
    });
    var Yc = /^(?:body|html)$/i;
    n.fn.offset = function (a) {
        if (arguments.length)return a === undefined ? this : this.each(function (b) {
            n.offset.setOffset(this, a, b)
        });
        var b, c, d, e, f, g, h, i, j, k, l = this[0], m = l && l.ownerDocument;
        if (!m)return;
        return(d = m.body) === l ? n.offset.bodyOffset(l) : (c = m.documentElement, n.contains(c, l) ? (b = l.getBoundingClientRect(), e = Zc(m), f = c.clientTop || d.clientTop || 0, g = c.clientLeft || d.clientLeft || 0, h = e.pageYOffset || c.scrollTop, i = e.pageXOffset || c.scrollLeft, j = b.top + h - f, k = b.left + i - g, {top: j, left: k}) : {top: 0, left: 0})
    }, n.offset = {bodyOffset: function (a) {
        var b = a.offsetTop, c = a.offsetLeft;
        return n.support.doesNotIncludeMarginInBodyOffset && (b += parseFloat(n.css(a, "marginTop")) || 0, c += parseFloat(n.css(a, "marginLeft")) || 0), {top: b, left: c}
    }, setOffset: function (a, b, c) {
        var d = n.css(a, "position");
        d === "static" && (a.style.position = "relative");
        var e = n(a), f = e.offset(), g = n.css(a, "top"), h = n.css(a, "left"), i = (d === "absolute" || d === "fixed") && n.inArray("auto", [g, h]) > -1, j = {}, k = {}, l, m;
        i ? (k = e.position(), l = k.top, m = k.left) : (l = parseFloat(g) || 0, m = parseFloat(h) || 0), n.isFunction(b) && (b = b.call(a, c, f)), b.top != null && (j.top = b.top - f.top + l), b.left != null && (j.left = b.left - f.left + m), "using"in b ? b.using.call(a, j) : e.css(j)
    }}, n.fn.extend({position: function () {
        if (!this[0])return;
        var a = this[0], b = this.offsetParent(), c = this.offset(), d = Yc.test(b[0].nodeName) ? {top: 0, left: 0} : b.offset();
        return c.top -= parseFloat(n.css(a, "marginTop")) || 0, c.left -= parseFloat(n.css(a, "marginLeft")) || 0, d.top += parseFloat(n.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(n.css(b[0], "borderLeftWidth")) || 0, {top: c.top - d.top, left: c.left - d.left}
    }, offsetParent: function () {
        return this.map(function () {
            var a = this.offsetParent || c.body;
            while (a && !Yc.test(a.nodeName) && n.css(a, "position") === "static")a = a.offsetParent;
            return a || c.body
        })
    }}), n.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (a, b) {
        var c = /Y/.test(b);
        n.fn[a] = function (d) {
            return n.access(this, function (a, d, e) {
                var f = Zc(a);
                if (e === undefined)return f ? b in f ? f[b] : f.document.documentElement[d] : a[d];
                f ? f.scrollTo(c ? n(f).scrollLeft() : e, c ? e : n(f).scrollTop()) : a[d] = e
            }, a, d, arguments.length, null)
        }
    }), n.each({Height: "height", Width: "width"}, function (a, b) {
        n.each({padding: "inner" + a, content: b, "": "outer" + a}, function (c, d) {
            n.fn[d] = function (d, e) {
                var f = arguments.length && (c || typeof d != "boolean"), g = c || (d === !0 || e === !0 ? "margin" : "border");
                return n.access(this, function (b, c, d) {
                    var e;
                    return n.isWindow(b) ? b.document.documentElement["client" + a] : b.nodeType === 9 ? (e = b.documentElement, Math.max(b.body["scroll" + a], e["scroll" + a], b.body["offset" + a], e["offset" + a], e["client" + a])) : d === undefined ? n.css(b, c, d, g) : n.style(b, c, d, g)
                }, b, f ? d : undefined, f)
            }
        })
    }), n.browser.msie && n.ajaxSetup({cache: !1});
    var $c = !1;
    return n.ajaxSetup({beforeSend: function (a) {
        var b = Meilishuo.config.nt;
        b && a.setRequestHeader("nt", b)
    }, complete: function (a) {
        var b = a.getResponseHeader("nt");
        b && (Meilishuo.config.nt = b)
    }, error: function (a) {
        switch (a.status) {
            case 461:
                $c || (window.location = window.location.href), $c = !0;
                break;
            case 4022:
        }
    }}), window.jQuery = window.$ = n, n
});
fml.define("app/login", ["jquery", "component/placeholder", "component/storage", "component/urlHandle", "component/validate", "component/shareTmp", "ui/dialog", "app/closeFrame", "app/tracking", "component/iStorage", "app/checkPic"], function (a, b) {
    function v(a, b, d, e) {
        var h = "/account/sign/in", i = {loginId: c(a).val(), password: c(b).val(), remember: c(e)[0].checked ? true : false, redirect: f.getParams(location.href).redirect, nt: Meilishuo.config.nt, code_type: "c4"}, k = function (a) {
            if(a.statusCode == "1")
                window.location.href = "/";
            else
                $(".loginErrorMessage").html(a.msg).show();
        };
        c.post(h, i, k, "json")
    }

    function w(a) {
        var b = "loginForm", d = {mlsUser: {"req=注册时使用的邮箱/昵称": "请输入您的用户名或注册邮箱"}, password: {"req=密码": "请输入密码", "minlen=6": "输入密码需在6位到32位间", "maxlen=32": "输入密码需在66位到32位间"}}, e = {"showmsgbyline=msg_error": "", "showmsgforsubmit=login_btn_wrap": a}, f = {success: "span=msg_ok", error: "span=msg_err", isExist: {mlsUser: function (a) {
            c.trim(c("#mlsUser").val()) == "" ? a("账号不能为空。") : a("")
        }, password: function (a) {
            c.trim(c("#password").val()) == "" ? a("密码不能为空。") : a("")
        }}};
        r = h.validate(b, d, e, f)
    }

    function x() {
        j();
        var a;
        c(".checkImage").click(function () {
            if (a)return;
            j(), a = 1, setTimeout(function () {
                a = 0
            }, 500)
        })
    }

    function y() {
        t.isShow() && r && (r.addValid({checkcode: {"req=验证码": "请输入验证码", "minlen=4": "验证码为4位字符"}}), x())
    }

    function z() {
        u.isShow() && r && (m.initPic(), o = !0)
    }

    function A() {
        var a = {placeholderCSS: {"line-height": "34px"}};
        c("#loginForm input[placeholder]").placeholder(a), w(function () {
            o && p.val(a), v("#mlsUser", "#password", "#checkcode", "#savestate")
        }), y(), z()
    }

    function B(a) {
        c.post("/aw/user/captcha", function (b) {
            a && a(b)
        }, "json")
    }

    var c = a("jquery"), d = a("component/shareTmp"), e = a("ui/dialog"), f = a("component/urlHandle"), g = a("component/storage"), h = a("component/validate"), i = a("app/tracking"), j = a("app/checkcode"), k = a("app/closeFrame"), l = a("component/iStorage"), n = !1, o = !1, p = c("#checkcode"), q = function () {
        return l.removeCookie("numInCart"), this
    }, r, s, t = {show: function () {
        c(".authcode").show()
    }, isShow: function () {
        return c(".authcode").length == 0 ? !1 : !c(".authcode").is(":hidden")
    }}, u = {show: function () {
        c(".authpic").show()
    }, isShow: function () {
        return c(".authpic").length == 0 ? !1 : !c(".authcode").is(":hidden")
    }}, C = function () {
        g.setCookie("LOGON_FROM", document.referrer), c(".more_way_wrap h4").click(function () {
            c(this).next(".more_way").toggle()
        }), A()
    }, D = function () {
        n = !0, A(), c(".login_btn_wrap").click(function () {
            i.cr("login_window_others-btnlogin")
        })
    }, E = function (a) {
        if (Meilishuo.config.is_iPad)return window.MLS = {didLogin: function () {
            window.location.reload()
        }}, window.location.href = "meilishuohd://login.meilishuo/";
        var b = a || {}, f = "", h = b.refer_type || g.getCookie("MEILISHUO_REFER");
        if (h == "weibo") {
            f = "sina";
            var j = d("loginSina")
        } else if (h == "gdt.qq") {
            f = "qq";
            var j = d("loginQQ")
        } else if (h == "renren") {
            f = "renren";
            var j = d("loginRenren")
        } else if (h == "others") {
            f = "others";
            var j = d("loginTpl")
        } else {
            f = "others";
            var j = d("loginTpl")
        }
        var k = b.onClose;
        b.onClose = function () {
            i.cr("login_window_others-close"), k && typeof k == "function" && k()
        };
        var l = j;
        s = new e({title: "登录", width: b.width || 620, content: l, onStart: function () {
        }, onClose: b.onClose}), b.fn && b.fn(s), b.param && typeof b.param == "object" ? i.cr("login_window_" + f, b.param) : i.cr("login_window_" + f), h !== "weibo" && h !== "gdt.qq" && h !== "renren" && (c(".login_wrap .login_form_wrap").length == 0 && (B(function (a) {
            a.need_captcha == 1 && t.show(), A()
        }), c(".login_btn_wrap").click(function () {
            i.cr("login_window_others-btnlogin")
        })), c(".more_tip").click(function () {
            c(this).next(".more_way").toggle(), i.cr("login_window_others-more")
        }), c(".douban,.baidu").hover(function () {
            c(this).children(".msg").show()
        }, function () {
            c(this).children(".msg").hide()
        }))
    }, F = function (a) {
        E({onClose: k, refer_type: a})
    }, G = function (a) {
        var b = d("checkCodeTpl");
        s = new e({title: "获取短信验证码", width: 430, content: b}), x(), c(".submitCode").click(function () {
            return J(a), !1
        })
    }, H = function (a) {
        var b = d("picAuth");
        o = !0, s = new e({title: "获取短信验证码", width: 430, content: b}), p = c("#checkcode"), m.initPic(), c(".submitCode").click(function () {
            var b = m.clickNum().join("");
            return p.val(b), I(a), !1
        })
    }, I = function (a) {
        var b = "/aj/check_code_aj/pic_code/pic_validate", d = c("#checkcode").val().split("").join(",");
        K(b, d, a)
    }, J = function (a) {
        var b = "/user/reg/validate", d = c.trim(c("#checkcode").val());
        K(b, d, a)
    }, K = function (a, b, d) {
        if (!b) {
            d();
            return
        }
        var e = {rule: "captcha", data: b};
        o && (e.code_type = "c4");
        var f = function (a) {
            var b;
            a == 6 ? (d(a, null), o && m.changePic()) : a == 0 && (b = !0, d(a, e.data)), b && c("#closeDialog").trigger("click")
        };
        c.post(a, e, f, "json")
    };
    b.showLogin = C, b.showLoginWin = E, b.showGoodsLoginWin = F, b.showCheckCode = G, b.showLoginForm = D, b.showCheckPic = H
});
fml.use(["app/login"], function () {
    var a = this.login;
    a.showLogin()
}), fml.define("page/login", ["jquery"], function () {
});
fml.use("app/checkLogin", function (a) {
    $(".mt_zzs").bind("click", function () {
        return a()
    })
}), fml.use("component/focus", function (a) {
    a.inputFocus(".ser_n .searchKey")
}), fml.use("app/sharePost", function (a) {
    a.dialogShow("shareMeiliDialog")
}), fml.use(["app/hoverNav", "app/tracking"], function () {
    var a = this.tracking, b = this.hoverNav;
    b(".hoverNav", ".header_nav"), $(".header_nav").bind("mouseenter", function () {
        a.cr("header_nav")
    })
}), fml.use("app/adPoster", function () {
    this.carousel(".daily_mobile", {type: 1, height: 30})
}), fml.use(["component/windowScroll", "jquery", "component/position", "component/iStorage"], function () {
    var a = this.jquery, b = this.windowScroll, c = this.position, d = a.browser.msie && a.browser.version == "6.0", e = a("#navbar, #shop-nav"), f = a("#shop_coupon_couplet");
    if (e.length && f.length) {
        var g = a(".header_bg:first"), h = e.height(), i = e.offset(), j = d ? function () {
            e.css({position: "relative", top: 0}), b.unBind("logonfloat"), g.css({"margin-bottom": 0})
        } : function () {
            e.css({position: "relative", top: 0}), g.css({"margin-bottom": 0}), f.css({top: i.top + e.height() + 100 + "px", position: "absolute"})
        }, k = d ? function (c) {
            e.css({position: "absolute", left: 0, top: c + "px", "z-index": 100}), b.bind(function (a) {
                e.css({top: a + "px"})
            }, "logonfloat"), a.browser.msie ? g.css({"margin-bottom": h}) : g.css({"margin-bottom": h + 42})
        } : function () {
            e.css({position: "fixed", left: 0}), g.css({"margin-bottom": h}), f.css({top: e.height() + 100 + "px", position: "fixed"})
        };
        i && (j(), b.yIn(i.top, k, j))
    }
    var l = a("#goTop"), m = a("#feedback"), n = a("#go_top"), o = a(window), p = a(".share_group"), q = a("#go_top");
    b.yIn(a(window).height() - 100, function () {
        q.show()
    }, function () {
        q.hide()
    }), q.bind("click", function () {
        return a("body,html").stop(!0, !0).animate({scrollTop: 0}, 250), !1
    });
    if (d) {
        l.css("position", "absolute"), a("#feedback").css("position", "absolute");
        var r = {top: p.size() > 0 ? p.offset().top : 0};
        b.bind(function (b) {
            l.css({top: b + o.height() - 240 + "px"}), a("#feedback").css({top: b + o.height() - 320 + "px"}), r.top && c.toFixed(p, r)
        })
    }
}), fml.use("app/addFavorite", function () {
    this.addFavor()
}), fml.use("app/search", function () {
    this.init()
}), fml.use("jquery", function (a) {
    a(".fm_hd_btm_shbx_bttn").click(function () {
        var b = a(this).parents(".searchBox").find(".searchKey");
        if (a.trim(b.val()) == "" || b.val() == b.attr("placeholder"))return!1
    })
}), fml.use("page/im/open", function () {
    this.bind(".knilmi", {is_simple: !0}), this.bind({parent: fml.vars.globalSidebarSelector, self: ".openIM-shop"}, {is_simple: !0})
}), fml.use("app/referrer", function () {
}), fml.use(["jquery", "component/shareTmp", "ui/dialog", "component/focus"], function () {
    function c() {
        function i(a) {
            var b = /\S+@\S+\.\S+/;
            return b.test(a.value)
        }

        var c = b.shareTmp, d = b.dialog, e = b.focus, f = a(c("mailSub")), g = '邮件订阅<span style="font-size: 12px; font-weight: normal;">-为您推荐感兴趣的内容!</span>', h = new d({title: g, width: 430, content: f, onStart: function () {
        }, onClose: function () {
        }});
        e.inputFocus("#sub_email"), e.inputFocus("#sub_opt");
        var j = a("#sub_email");
        j.focus(function () {
            f.find(a(".hint_sub")).addClass("none_f")
        }).blur(function () {
            i(j[0]) || f.find(a(".hint_sub")).removeClass("none_f")
        }), a("#substribe").submit(function () {
            if (!i(j[0]))return f.find(a(".hint_sub")).removeClass("none_f"), !1;
            var b = a("#sub_opt").val();
            (b == "" || b == "选填") && a("#sub_opt").val(""), window.setTimeout(function () {
                h.drive.destroyModel()
            }, 20)
        })
    }

    var a = this.jquery, b = this;
    a("#sub_mail").click(c)
}), fml.use(["jquery", "component/shareTmp"], function () {
    var a = this.jquery, b = this, c = null, d = null, e = null, f = a("#goTop");
    setTimeout(function () {
        f.find(".two_code").hover(function () {
            d = d || b.shareTmp, e ? e.show() : (e = a(d("weixinCode")), f.append(e.show())), c = f.find(".qq_card"), c.length > 0 && c.hide()
        }, function () {
            e.hide(), c.length > 0 && c.show()
        })
    }, 1e3)
}), fml.use(["jquery", "component/iStorage", "app/tracking"], function () {
    var a = this.jquery, b = this.tracking, c = this, d = a(".bind_tip"), e = a(".bind_tip strong"), f = a(".header_top .close_bnr_btn"), g = a(".header_top"), h = this.iStorage, i = d.data("isweak"), j = window.location.href, k = j.indexOf("/settings/");
    i == 1 && k < 0 && (d.show(), e.click(function (b) {
        var c = a(this);
        a.get("/aj/weak_password_aj/weakPassword/remove", {}, function (a) {
            c.parent().hide()
        }, "json")
    })), f.click(function (c) {
        a(this).parents(".header_top").hide();
        var d = {act_name: "header_banner_global", time_type: 1, type: "add"};
        a.get("/aj/huodong/user_mark", d, function () {
        }, "json"), b.cr("bnr_close")
    })
}), fml.use(["jquery", "app/setting"], function () {
    var a = this.jquery, b = this.setting, c = a("#topbanner");
    if (!c.length)return;
    var d = c.attr("mini"), e = c.attr("showSec") | 0, f = c.attr("mini_height") | 0;
    if (e <= 0)return;
    window.setTimeout(function () {
        c.animate({height: f}, function () {
            c.css("background-image", "url(" + d + ")"), b.init()
        })
    }, e * 1e3)
}), fml.use("jquery", function () {
    var a = this, b = a(".club_guide"), c = window.location.href;
    if (!b.length || c.indexOf("/club") > -1)return;
    b.show(), a(".club_guide_close").click(function () {
        var c = "/aw/club/club_guide", d = {status: 1}, e = function (a) {
        };
        a.post(c, d, e, "json"), b.hide()
    }), a(".club_guide_go").click(function () {
        var b = "/aw/club/club_guide", c = {status: 2}, d = function (a) {
            window.location.href = "/club?frm=club_guide"
        };
        return a.post(b, c, d, "json"), !1
    })
})/*, fml.use("page/common/shopping_carts", function () {
    this.readShopsCount()
})*/, fml.use("app/eventHover", function () {
    this.hoverShow(".nav_new .dress", ".header_list"), this.hoverShow(".nav_new .report", ".header_list"), this.hoverShow(".menu_leo #setting", ".add_menu_leo"), this.hoverShow(".menu_leo #message", ".add_menu_leo"), this.hoverShow("#downapp", ".down")
}), fml.use("app/focus_banner", function () {
    this.bind({unit: ".header_top .head_bnr li", btn: ".adType1 a", transition: "fade"})
}), fml.use("jquery", function (a) {
    var b = "pstrc";
    if (location.search.length < 2)return;
    var c = new RegExp("\\b" + b + "=([\\w\\W]+?)(\\&|$)"), d = location.search.match(c);
    if (!d || !d[1])return;
    d = decodeURIComponent(d[1]), d = decodeURIComponent(d), a("body").on("click", "a", function () {
        var e = a(this).attr("href");
        if (!e || e.indexOf("javascript:") > -1 || e.indexOf("#") == 0)return;
        var f = e.split("#"), g = f[1], f = f[0];
        if (a(this).data(b))return;
        var h = f.match(c), i = d;
        if (h && h[1]) {
            h = decodeURIComponent(h[1].split("|")[0]);
            if (d.indexOf(h) == -1) {
                var i = d.split("|"), j = h.split(":");
                for (var k = i.length - 1; k >= 0; k--) {
                    var l = i[k].split(":");
                    l[0] == j[0] && i.splice(k, 1)
                }
                i.unshift(h), i.length > 10 && i.splice(10) && i.push("bad"), i = i.join("|")
            }
            f = f.replace(c, "")
        }
        var m = f.slice(-1);
        "&" != m && "?" != m && (f += f.indexOf("?") > -1 ? "&" : "?"), f += b + "=" + encodeURIComponent(i), g && (f += "#" + g), a(this).attr("href", f).data(b, 1)
    })
}), fml.use("jquery", function (a) {
    if ("https:" === window.location.protocol)return;
    var b = document.createElement("script"), c = document.getElementsByTagName("script")[0];
    b.src = "http://tjs.sjs.sinajs.cn/open/api/js/wb.js", b.async = !0, c.parentNode.insertBefore(b, c);
    var d = null, e = a(".sina_attention"), f = e.find(".sina_attention_area");
    e.mouseover(function () {
        f.show(), clearTimeout(d)
    }).mouseout(function () {
        d = setTimeout(function () {
            f.hide()
        }, 500)
    }), f.mouseout(function () {
        f.hide()
    })
}), fml.use(["jquery", "component/shareTmp"], function () {
    var a = this.jquery, b = this, c = b.shareTmp;
    if (!fml.vars.ad_leftPic)return;
    a.get("/aj/bay_window_aj/sale/bay_window", {}, function (b) {
        var d = b.data, e = c("bay_window", {baydata: d});
        a.get("/aj/ad_win/adWin", {time_type: 1}, function (b) {
            b.data == 0 && (a("body").append(e), a(document).trigger("ad11_ok"))
        }, "json")
    }, "json"), a("body").on("click", ".close_ad11", function () {
        a(".activity_ad11").remove();
        var b = {act_name: "left_ad_global", time_type: 1, type: "add"};
        a.get("/aj/huodong/user_mark", b, function () {
        }, "json")
    })
}), fml.use(["jquery", "ui/dialog", "component/shareTmp"], function () {
    if (!fml.vars.apparel_alert)return;
    var a = this.dialog, b = this.shareTmp, c = function (c) {
        var d = b("apparel_alert", c), e = new a({content: d, width: "684px", onStart: function () {
            $("#overlay").css({"background-color": "black", filter: "alpha(opacity=40)", opacity: .4})
        }, onChange: function () {
            $("#dialogTitle").hide(), $("#dialogLayer").css({background: "none", filter: ""}), $("#dialogContent").css({background: "none"})
        }});
        $(".closeButton, .check_act").on("click", function () {
            e.drive.destroyModel()
        })
    };
    $.get("/aj/fullalert/dialog", {time_type: 1}, function (a) {
        a.code === 1 && c({apparel_alert: a})
    }, "json")
}), fml.use(["jquery", "component/shareTmp"], function () {
}), fml.define("page/common/global", ["page/common/global_login"], function () {
    var a = fml.vars, b = a.is_item_page ? 2 : 1, c = !1, d = new Date;
    window.location.hostname == "www.meilishuo.com" && window.location.pathname == "/" && Date.parse("2016/7/25 00:00:00") <= d && d < Date.parse("2016/7/30 00:00:00") ? c = !0 : c = !1
});
fml.define("app/tracking", ["jquery", "component/iStorage"], function (a, b) {
    function j(a) {
        var b = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ", c = "", d = a;
        while (d--)c += b.substr(Math.floor(Math.random() * 62), 1);
        return c
    }

    function k() {
        return g = j(10) + "-" + ((new Date).getTime() - (new Date(2012, 6, 1)).getTime()), m(), g
    }

    function l(a) {
        var b = [];
        for (var c in a)b.push(c + "=" + encodeURIComponent(a[c]));
        return b.join("&")
    }

    function m() {
        var a = "unknown";
        Meilishuo && Meilishuo.config && (a = Meilishuo.config.user_id), q("device", {refer: document.referrer, userid: a, w_w: window.screen.width, w_h: window.screen.height})
    }

    function n(a) {
        var b = window.onbeforeunload;
        window.onbeforeunload = function (c) {
            a(), b && b()
        }
    }

    function o() {
    }

//    function p() {
//        var a = document.documentElement || document.body, b = window.name;
//        b || (b = window.name = j(6)), q("pv/in", {refer: document.referrer, url: window.location.href, win: b, userid: Meilishuo.config.user_id, b_w: a.clientWidth, b_h: a.clientHeight}), n(function () {
//            q("pv/out", {pgout: (new Date).getTime()})
//        })
//    }

    function q(a, b) {
        if (!g) {
            if (f--)return window.setTimeout(function () {
                q(a, b)
            }, 25);
            g = "unknown"
        }
        a = a ? a + "/" : "", a += "?";
        var c = 2e3, d, j;
        i++, j = l({device_id: g, pgid: h, seqid: i});
        for (var k in b) {
            var m = b[k];
            if (!m)continue;
            "function" == typeof m ? m = m() : "object" == typeof m && m.length ? m = m.join("+") : m && (m = encodeURIComponent(m));
            if (undefined === m)continue;
            b[k] = m, j += "&" + k + "=" + m
        }
        var n = new Image;
        n.src = e + a + j
    }

//    var c = a("jquery"), d = a("component/iStorage"), e = "//sense.meilishuo.com/", f = 10, g, h = (new Date).getTime(), i = 0;
//    "newlab.meilishuo.com" == window.location.host && (e = "//senselab.meilishuo.com/"), d.get("device", function (a) {
//        "undefined" == a && (a = null), g = a || d.set("device", k())
//    }), b.logIt = function (a, b) {
//        q(a, b || {})
//    }, b.cr = function (a, b) {
//        q("cr/" + a, b || {})
//    }, b.logClick = function (a, b, d) {
//        function f() {
//            q(d, {click: e}), e = []
//        }
//
//        function g(c) {
//            c = c || window.event;
//            var d = [c.pageX, c.pageY];
//            d.push((a ? this : c.target).getAttribute(b || "frm") || ""), e.push(d.join(",")), delete d, (e.length > 5 || a) && f()
//        }
//
//        var e = [], d = d || "click";
//        return a ? c(document).on("click", a, g) : (c(document).click(g), n(f)), this
//    }, b.logPoster = function () {
//        function a(a) {
//            if (!a || !a.tInfo)return;
//            var b = [];
//            try {
//                for (var c = 0, d = a.tInfo.length; c < d; c++)b.push(a.tInfo[c].twitter_id);
//                q("poster", {site_userid: Meilishuo.config.user_id, site_refer: window.location.pathname, site_tid: b})
//            } catch (e) {
//            }
//        }
//
//        return fml.eventProxy("logPoster", a), this
//    }, p()
});
fml.define("app/execOnceForNew", ["jquery", "app/tracking", "component/iStorage", "component/windowScroll", "app/addFavorite"], function (a, b) {
    var c = a("jquery"), d = a("app/tracking"), e = a("component/iStorage"), f = a("app/addFavorite"), g = a("component/windowScroll"), h = function () {
        e.get("isAddFavorite", function (a) {
            if (a === "1")return;
            e.get("isAddFavorNew", function (a) {
                a = a || "";
                var b = a.split(";");
                for (var d in b)if (b[d] === "1")return;
                var g = "index.html", h = c(".favor_new");
                if (h.length === 0)return;
                if (c(".mag_favor").length > 0)return;
                c(".favor_new").show(), e.set("isAddFavorNew", a + ";1"), h.find(".fav_close").click(function () {
                    h.hide()
                }), h.find(".add_fav_new").click(function () {
                    f.addFavorite({href: g, frm: "hf2", tipPos: {right: 95, top: 1}}), h.hide()
                })
            })
        })
    }, i = function () {
        if (c(".mag_favor").length === 0)return;
        e.get("isAddFavorMag", function (a) {
            function h() {
                b.hide()
            }

            if (a && a > 2)return;
            a = a || 0, e.set("isAddFavorMag", parseInt(a) + 1), c(".favor_new").length !== 0 && c(".favor_new").hide();
            var b = c(".mag_favor");
            b.show(), c.browser.msie && c.browser.version == "6.0" && (b.css({position: "absolute", left: "0px", top: c(window).scrollTop() + 260 + "px"}), g.bind(function (a) {
                b.css({top: a + 260 + "px"})
            })), b.find(".close_fav").click(function () {
                h()
            }), b.find(".add_fav").click(function () {
                d.cr("add_favor_from_mag"), f.addFavorite({href: location.href.split("?")[0], frm: "hfapp", name: c(".mag_fav_name").text() + "-美丽说", notShowTip: !0}), h()
            })
        })
    }, j = function () {
        if (c(".ban_add_fav").length === 0)return;
        c(".ban_add_fav").click(function () {
            d.cr("add_favor_from_land_ban"), f.addFavorite({frm: "hf5", obj: ".ban_add_fav", tipPos: {center: !0, top: 30}})
        })
    };
    return function () {
        location.href.indexOf("/group/") > -1 && !c.browser.safari && e.get("isAddFavorite", function (a) {
            if (a === "1")return;
            i()
        }), j()
    }
});